Skip to content
New issue

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

fix: npm exec does not use script-shell option to run commands #5297

Merged
merged 1 commit into from
Aug 17, 2022
Merged

fix: npm exec does not use script-shell option to run commands #5297

merged 1 commit into from
Aug 17, 2022

Conversation

lux01
Copy link
Contributor

@lux01 lux01 commented Aug 11, 2022

npm exec/npx do not fully respect the script-shell parameter. When combined with npm/run-script#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 npm/run-script#103

@lux01 lux01 requested a review from a team as a code owner August 11, 2022 12:04
@wraithgar
Copy link
Member

Ah yep, libnpmexec is pulling scriptShell out of flatOptions, but not passing it back through the chain to run-script

@wraithgar wraithgar self-assigned this Aug 11, 2022
Copy link
Member

@wraithgar wraithgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libnpmexec tests need to be refactored to use spawk. That's outside the scope of this PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants