We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
parseargs/index.js
Line 4 in 886e99c
I assume this line is intended to emulate the proposed process.mainArgs and get the slice right when called from the node REPL and/or with --eval.
process.mainArgs
REPL
--eval
However, when the script being executed is es6 (.mjs) then require.main is undefined and it slices incorrectly. Tested using node v16.13.0.
.mjs
require.main
undefined
(I can refrain from posting bug reports if inappropriate for "early WIP"!)
The text was updated successfully, but these errors were encountered:
// es6.mjs import { parseArgs } from '@pkgjs/parseargs'; const result = parseArgs(); console.log(result);
$ node es6.mjs { args: {}, values: {}, positionals: [ '/Users/john/Documents/Sandpits/pkgjs/parseargs-issues/play/es6.mjs' ] }
Sorry, something went wrong.
@shadowspawn this seems good to fix 👍 commented on your PR.
Fixed by #20
shadowspawn
No branches or pull requests
parseargs/index.js
Line 4 in 886e99c
I assume this line is intended to emulate the proposed
process.mainArgs
and get the slice right when called from the nodeREPL
and/or with--eval
.However, when the script being executed is es6 (
.mjs
) thenrequire.main
isundefined
and it slices incorrectly. Tested using node v16.13.0.(I can refrain from posting bug reports if inappropriate for "early WIP"!)
The text was updated successfully, but these errors were encountered: