Sounds like it's the reverse version of https://github.com/standard-things/esm/issues/568 .
$ rm -r node_modules/.cache/
$ ./test/failWhale.mjs ; echo rv=$?
W: loaderArgs are currently ignored! []
D: remaining process.argv: [ '/usr/bin/node',
'/mnt/…/nodemjs/test/failWhale.mjs' ]
rv=23
$ ./test/failWhale.mjs ; echo rv=$?
W: loaderArgs are currently ignored! []
D: remaining process.argv: [ '/usr/bin/node',
'/mnt/…/nodemjs/test/failWhale.mjs' ]
file:///mnt/…/nodemjs/test/failWhale.mjs:1
#!/usr/bin/env nodemjs
SyntaxError: Invalid or unexpected token
rv=1
$ for N in {1..16}; do ./test/failWhale.mjs &>/dev/null; echo rv=$?; done
rv=23
rv=1
rv=23
rv=1
rv=23
rv=1
rv=23
rv=1
rv=23
rv=1
rv=23
rv=1
rv=23
rv=1
rv=23
rv=1
I suspected it might have been due to my manipulation of process.argv, so I tried with process.argv[1] = 'bogus'. No difference, it still complained about, and showed, failWhale.mjs.
:+1: Thanks! :-)
I'd appreciate if you could release it to npm soon. I tried the commit syntax as dependency but somehow npm takes forever to install it this way.
v3.0.81 is released :tada:
Thanks! :+1: :tada: