test.js
#!/usr/bin/env deno
console.log(Deno.args);
> ./test.js -B
[ "./test.js", "-B" ]
> ./test.js -A
[ "./test.js" ]
That's because -A is an alias for --allow-all permission flag.
That's because
-Ais an alias for--allow-allpermission flag.
But I just pass it to the script rather then deno.
It's unfriendly to let coder to avoid all deno options when design scripts, and change API when deno add a new option that the script happen to use.
That's because
-Ais an alias for--allow-allpermission flag.But I just pass it to the script rather then deno.
It's unfriendly to let coder to avoid all deno options when design scripts, and change API when deno add a new option that the script happen to use.
Yes, agreed. There's already issue for that #3011 (title is different but it's the same underlying problem)
Yes, agreed. There's already issue for that #3011 (title is different but it's the same underlying problem)
./foo.js -B -- -A is also monstrous, maybe -- also use in script.
Duplicate of #2798.
We seem to have agreed there that simply passing everything after the script name to the script would be most desirable... though nothing's happened.
deno penetrates the -- when seeking more unnamed arguments (like the module name). That's not occurring here. The -- for this usage works fine but people don't like it.This should be fixed after #3389 landed
Most helpful comment
Duplicate of #2798.
We seem to have agreed there that simply passing everything after the script name to the script would be most desirable... though nothing's happened.
3011 is unrelated: it says that
denopenetrates the--when seeking more unnamed arguments (like the module name). That's not occurring here. The--for this usage works fine but people don't like it.