Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*command-line-args* does not survive loadFile() #372

Open
chr15m opened this issue Nov 16, 2024 · 0 comments
Open

*command-line-args* does not survive loadFile() #372

chr15m opened this issue Nov 16, 2024 · 0 comments

Comments

@chr15m
Copy link

chr15m commented Nov 16, 2024

version

v1.3.195

platform

Linux: Ubuntu
Node: v20.17.0

problem

You can use *command-line-args* to get args in a .cljs script, but if you then invoke that cljs script from JavaScript the args are nil.

repro

(ns args)
(print *command-line-args*)
import { loadFile } from "nbb";
await loadFile("args.cljs");

Running these:

$ npx nbb args.cljs --hello
(--hello)
$ node args.mjs --hello
nil

expected behavior

I think I would expect the output of the second command to match the first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant