-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
CLI switch "--scripts-prepend-node-path" doesn't work #5776
Comments
Is |
Yeah - this probably comes from npm. I'm new to yarn, but it is in the code... Lines 99 to 103 in a35a4f9
|
oops! yes it is. Text search failed me when I tried to find it in the code. My fault. It's implemented too: |
I would love to take this one 😊 |
There appears to have been a regression. See: yarn/src/util/execute-lifecycle-script.js Line 177 in a35a4f9
As of |
is this just the default behavior of yarn? |
The flag existed prior to yarn 1.15, per the changelog it was removed as this is now the default behavior (as @ntindle said) However, I still get an error and suggestion to use the flag occasionally: |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Using the
--scripts-prepend-node-path
switch seems not to do anything.Running this outputs an "env" without
myNodePath
in the "PATH".We would expect that the node path (
/myNodePath/bin
) be the first thing in the PATH in the env. In fact, if I comment out the config check in yarn:If I make that change, then see what I expect - the path includes
/myNodePath/bin
, and my install scripts, and "yarn run" scripts work as expected.If the current behavior is a bug, please provide the steps to reproduce.
This reproduces every time.
What is the expected behavior?
As above. We expect that using --scripts-prepend-node-path should prepend the node path to the PATH in the environment when scripts are executed at install time and run time.
Please mention your node.js, yarn and operating system version.
node v8.10.0
yarn v1.6.0
The text was updated successfully, but these errors were encountered: