"--" after "-e <script>" means end-of-options
There is currently no way to pass the first argument to an eval script that starts with a hyphen.
node -e 'console.log(process.argv)' -arg1 [ '/usr/bin/node' ]
node -e 'console.log(process.argv)' -- -arg1 [ '/usr/bin/node' ]
After this fix node -e 'console.log(process.argv)' -- -arg1 [ '/usr/bin/node', '-arg1' ]
Checklist
-
make -j4 test
(UNIX) -
tests added -
commit message follows commit guidelines