Skip to content

Commit

Permalink
Merge pull request #84 from bmarcaur/fix/npm-execpath-case-sensitivity
Browse files Browse the repository at this point in the history
Fix Case Sensitive NPM_EXECPATH
  • Loading branch information
mysticatea committed Jan 17, 2017
2 parents 81e3d0f + bb9e627 commit 181b689
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/npm-run-all/help.js
Expand Up @@ -34,7 +34,7 @@ Options:
--max-parallel <number> - Set the maximum number of parallelism. Default is
unlimited.
--npm-path <string> - - - Set the path to npm. Default is the value of
environment variable NPM_EXECPATH.
environment variable npm_execpath.
If the variable is not defined, then it's "npm".
In this case, the "npm" command must be found in
environment variable PATH.
Expand Down
2 changes: 1 addition & 1 deletion bin/run-p/help.js
Expand Up @@ -34,7 +34,7 @@ Options:
--max-parallel <number> - Set the maximum number of parallelism. Default is
unlimited.
--npm-path <string> - - - Set the path to npm. Default is the value of
environment variable NPM_EXECPATH.
environment variable npm_execpath.
If the variable is not defined, then it's "npm."
In this case, the "npm" command must be found in
environment variable PATH.
Expand Down
2 changes: 1 addition & 1 deletion bin/run-s/help.js
Expand Up @@ -32,7 +32,7 @@ Options:
itself will exit with non-zero code if one or
more tasks threw error(s).
--npm-path <string> - - - Set the path to npm. Default is the value of
environment variable NPM_EXECPATH.
environment variable npm_execpath.
If the variable is not defined, then it's "npm."
In this case, the "npm" command must be found in
environment variable PATH.
Expand Down
2 changes: 1 addition & 1 deletion docs/node-api.md
Expand Up @@ -50,7 +50,7 @@ Run npm-scripts.
Default is `Number.POSITIVE_INFINITY`.
- **options.npmPath** `string` --
The path to npm.
Default is `process.env.NPM_EXECPATH` or `"npm"`.
Default is `process.env.npm_execpath` or `"npm"`.
- **options.packageConfig** `object|null` --
The map-like object to overwrite package configs.
Keys are package names.
Expand Down
2 changes: 1 addition & 1 deletion docs/npm-run-all.md
Expand Up @@ -39,7 +39,7 @@ Options:
--max-parallel <number> - Set the maximum number of parallelism. Default is
unlimited.
--npm-path <string> - - - Set the path to npm. Default is the value of
environment variable NPM_EXECPATH.
environment variable npm_execpath.
If the variable is not defined, then it's "npm."
In this case, the "npm" command must be found in
environment variable PATH.
Expand Down
2 changes: 1 addition & 1 deletion docs/run-p.md
Expand Up @@ -38,7 +38,7 @@ Options:
--max-parallel <number> - Set the maximum number of parallelism. Default is
unlimited.
--npm-path <string> - - - Set the path to npm. Default is the value of
environment variable NPM_EXECPATH.
environment variable npm_execpath.
If the variable is not defined, then it's "npm."
In this case, the "npm" command must be found in
environment variable PATH.
Expand Down
2 changes: 1 addition & 1 deletion docs/run-s.md
Expand Up @@ -36,7 +36,7 @@ Options:
itself will exit with non-zero code if one or
more tasks threw error(s).
--npm-path <string> - - - Set the path to npm. Default is the value of
environment variable NPM_EXECPATH.
environment variable npm_execpath.
If the variable is not defined, then it's "npm."
In this case, the "npm" command must be found in
environment variable PATH.
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -204,7 +204,7 @@ function maxLength(length, name) {
* Default is unlimited.
* @param {string} options.npmPath -
* The path to npm.
* Default is `process.env.NPM_EXECPATH`.
* Default is `process.env.npm_execpath`.
* @returns {Promise}
* A promise object which becomes fullfilled when all npm-scripts are completed.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/run-task.js
Expand Up @@ -136,7 +136,7 @@ module.exports = function runTask(task, options) {
}

if (path.extname(options.npmPath || "a.js") === ".js") {
const npmPath = options.npmPath || process.env.NPM_EXECPATH //eslint-disable-line no-process-env
const npmPath = options.npmPath || process.env.npm_execpath //eslint-disable-line no-process-env
const execPath = npmPath ? process.execPath : "npm"
const spawnArgs = [].concat(
npmPath ? [npmPath, "run"] : ["run"],
Expand Down

0 comments on commit 181b689

Please sign in to comment.