cli
cli copied to clipboard
fix: npm exec does not use script-shell option to run commands
npm exec/npx do not fully respect the script-shell parameter. When combined with https://github.com/npm/run-script/issues/103 this means that users on AIX cannot run npx/npm exec commands even with script-shell set to bash.
For example:
$ npm config get script-shell
bash
$ npx
Entering npm script environment at location:
/home/gb120268/package/bin
Type 'exit' or ^D when finished
bash: --: not found
$ npm config delete script-shell
$ ./npx
Entering npm script environment at location:
/home/gb120268/package/bin
Type 'exit' or ^D when finished
sh: --: not found
References
Related to https://github.com/npm/run-script/issues/103
Ah yep, libnpmexec is pulling scriptShell out of flatOptions, but not passing it back through the chain to run-script