-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[BUG] npx doesn't pass $1 properly to executed package on Linux/Darwin #3067
Comments
This was a change we've made in v7 where we run scripts in a shell & don't have a way of reintroducing that v6 behaviour, which we believed to be problematic. . |
@isaacs ping - I think you got this working? |
@darcyclarke This behavior change is super surprising. Let’s say you used to have
Now, you install them locally instead. How do you run then? Easy, just put
Wrong! Now your command doesn’t work anymore. Since this uses I reported the same thing but for backticks here: #3306 And I’ve got a PR fixing it here: npm/run-script#31 |
I can reproduce this. I'm not sure that npm/run-script#31 is quite the right way to go, but may be with some modifications. In the meantime, this command does work properly:
That works because it uses the The ideal solution here is going to look like:
|
Current Behavior:
Executing this script passes to the husky wrong argument, but it properly worked at npm@6
The result is:
Expected Behavior:
The result is:
Steps To Reproduce:
git init
npm init
npm install husky -D
npm set-script prepare "husky install"
npm run prepare
npx husky add .husky/prepare-commit-msg 'npx --no-install jira-prepare-commit-msg "$1"'
I made some research here
Environment:
The text was updated successfully, but these errors were encountered: