-
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
yarn run
should provide NODE, like npm run
#2609
Comments
Is this documented in the npm documentation somewhere? |
npm run sets the NODE environment variable to the node executable with
which npm is executed
… |
… On Wed, Feb 1, 2017 at 8:28 PM Wout Mertens ***@***.***> wrote:
Yes, see https://github.com/npm/npm/blob/latest/doc/cli/npm-run-script.md
> npm run sets the NODE environment variable to the node executable with
which npm is executed
|
Worth noting that there's more in the paragraph that documents the behaviour in the run-scripts page:
It even gives a warning if you call On a Windows 8.1 machine with Node 6.9.4 and npm 4.1.1, the warning says:
|
**Summary** Fixes #2609. This patch adds a `$NODE` environment variable when running scripts through `yarn run` which is set to `process.execPath` unless it is formerly set to something else. `$npm_node_execpath` is now just an alias to `$NODE`. The patch also updates `yarn env` to show these extra environment variables. **Test plan** Updates existing `yarn env` tests.
…se (#4260) **Summary** Fixes #2609. This patch adds a `$NODE` environment variable when running scripts through `yarn run` which is set to `process.execPath` unless it is formerly set to something else. `$npm_node_execpath` is now just an alias to `$NODE`. The patch also updates `yarn env` to show these extra environment variables. **Test plan** Updates existing `yarn env` tests.
Awesome, thank you!
…On Fri, Aug 25, 2017, 11:16 PM Burak Yiğit Kaya ***@***.***> wrote:
Closed #2609 <#2609> via #4260
<#4260>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2609 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADWloJs_9pk-1bfdFWu4SwxKiyZho7Aks5sbzm0gaJpZM4Lz9Qp>
.
|
…se (yarnpkg#4260) **Summary** Fixes yarnpkg#2609. This patch adds a `$NODE` environment variable when running scripts through `yarn run` which is set to `process.execPath` unless it is formerly set to something else. `$npm_node_execpath` is now just an alias to `$NODE`. The patch also updates `yarn env` to show these extra environment variables. **Test plan** Updates existing `yarn env` tests.
Do you want to request a feature or report a bug?
bug
What is the current behavior?
The environment variable
NODE
is not set when runningyarn run anyscript
.If the current behavior is a bug, please provide the steps to reproduce.
env: "echo $NODE"
npm run env
yarn run env
What is the expected behavior?
2 and 3 return same value, the path to the node executable
Please mention your node.js, yarn and operating system version.
Node 7, Yarn 0.19.1, OS X 10.12.2
The text was updated successfully, but these errors were encountered: