diff options
author | isaacs <i@izs.me> | 2021-03-25 07:20:19 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-26 00:31:58 +0300 |
commit | 59cf37962a2286e0f7d3bd37fa9c8bc3bac94218 (patch) | |
tree | b155773999e00c92cb8a17a0d80d947ae820c52a /lib | |
parent | 95ba87622e00d68270eda9e071b19737718fca16 (diff) |
Always set npm.command to canonical command nameisaacs/set-npm-command-to-canonical-command
This ensures that we get a npm_command env set to, eg 'run-script'
instead of the shorthand 'run'.
PR-URL: https://github.com/npm/cli/pull/2958
Credit: @isaacs
Close: #2958
Reviewed-by: @wraithgar
Diffstat (limited to 'lib')
-rw-r--r-- | lib/npm.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/npm.js b/lib/npm.js index 42541a90f..5f8b2ff3d 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -25,7 +25,7 @@ const proxyCmds = new Proxy({}, { // old way of doing things, until we can make breaking changes to the // npm.commands[x] api target[actual] = new Proxy( - (args, cb) => npm[_runCmd](cmd, impl, args, cb), + (args, cb) => npm[_runCmd](actual, impl, args, cb), { get: (target, attr, receiver) => { return Reflect.get(impl, attr, receiver) |