Closed JonathanHolvey closed 1 year ago
Thanks for the bug report.
node_modules/.bin/shx.cmd
is not actually a part of this project. This is a file which is automatically created by npm
while it installs the package. I'm not sure what line 13 looked like before, but I think it's probably not something our project can control.
Does the same bug happen if you install a different npm package which has an executable? What happens if you run something like https://github.com/dthree/cash (or any npm package)?
npm install cash
node_modules\.bin\cash.cmd
I think this is actually a Windows problem (or feature?), as I subsequently found that a file named node.js
in the current directory will break anything that tries to execute node
. The same would presumably be true for other files with an 'executable' extension that happen to share their name with an executable in PATH.
To reproduce this issue:
Here, shx will attempt to run
node.js
instead ofnode.exe
, and nothing will happen. Ifnode.js
is a real JavaScript file, then it will be executed using the Windows Script Host.Changing line 13 of
node_modules/.bin/shx.cmd
toSET "_prog=node.exe"
allows shx to work as expected, but will probably break functionality for other users.