From 9778a1b878aaa817af6e99385e7683c2a389570d Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 21 Aug 2019 16:29:31 -0700 Subject: [PATCH] cmd-shim@3.0.3 Fix regression where shims fail to preserve exit code --- node_modules/cmd-shim/index.js | 4 ++-- node_modules/cmd-shim/package.json | 20 ++++++++++---------- package-lock.json | 6 +++--- package.json | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/node_modules/cmd-shim/index.js b/node_modules/cmd-shim/index.js index b1b6e583f4369..010bd38d398d2 100644 --- a/node_modules/cmd-shim/index.js +++ b/node_modules/cmd-shim/index.js @@ -113,7 +113,7 @@ function writeShim_ (from, to, prog, args, variables, cb) { // // "%_prog%" "%dp0%\.\node_modules\npm\bin\npm-cli.js" %* // @ENDLOCAL - // @EXIT /b + // @EXIT /b %errorlevel% // // :find_dp0 // SET dp0=%~dp0 @@ -124,7 +124,7 @@ function writeShim_ (from, to, prog, args, variables, cb) { 'SETLOCAL\r\n' + 'CALL :find_dp0\r\n' var foot = 'ENDLOCAL\r\n' + - 'EXIT /b\r\n' + + 'EXIT /b %errorlevel%\r\n' + ':find_dp0\r\n' + 'SET dp0=%~dp0\r\n' + 'EXIT /b\r\n' diff --git a/node_modules/cmd-shim/package.json b/node_modules/cmd-shim/package.json index 7d0545e327ac8..43a7b36a8fdd0 100644 --- a/node_modules/cmd-shim/package.json +++ b/node_modules/cmd-shim/package.json @@ -1,28 +1,28 @@ { - "_from": "cmd-shim@3.0.2", - "_id": "cmd-shim@3.0.2", + "_from": "cmd-shim@3.0.3", + "_id": "cmd-shim@3.0.3", "_inBundle": false, - "_integrity": "sha512-x/2sXAaA1lUgUCZ9zaeOGzSkXOoN2DFxY61kgfhnIIUe/2QK8DFDnezT2drSZa/u8SKQT3vRFwTFPMMgQmH8kg==", + "_integrity": "sha512-DtGg+0xiFhQIntSBRzL2fRQBnmtAVwXIDo4Qq46HPpObYquxMaZS4sb82U9nH91qJrlosC1wa9gwr0QyL/HypA==", "_location": "/cmd-shim", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "cmd-shim@3.0.2", + "raw": "cmd-shim@3.0.3", "name": "cmd-shim", "escapedName": "cmd-shim", - "rawSpec": "3.0.2", + "rawSpec": "3.0.3", "saveSpec": null, - "fetchSpec": "3.0.2" + "fetchSpec": "3.0.3" }, "_requiredBy": [ "#USER", "/", "/bin-links" ], - "_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-3.0.2.tgz", - "_shasum": "159a20602ac4295ec0997243a40ac9b2df54f5e3", - "_spec": "cmd-shim@3.0.2", + "_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-3.0.3.tgz", + "_shasum": "2c35238d3df37d98ecdd7d5f6b8dc6b21cadc7cb", + "_spec": "cmd-shim@3.0.3", "_where": "/Users/isaacs/dev/npm/cli", "bugs": { "url": "https://github.com/npm/cmd-shim/issues" @@ -56,5 +56,5 @@ "snap": "TAP_SNAPSHOT=1 tap test/*.js --100", "test": "tap test/*.js --100" }, - "version": "3.0.2" + "version": "3.0.3" } diff --git a/package-lock.json b/package-lock.json index 1d149f465e3b4..78907aaeca3fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -786,9 +786,9 @@ } }, "cmd-shim": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-3.0.2.tgz", - "integrity": "sha512-x/2sXAaA1lUgUCZ9zaeOGzSkXOoN2DFxY61kgfhnIIUe/2QK8DFDnezT2drSZa/u8SKQT3vRFwTFPMMgQmH8kg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-3.0.3.tgz", + "integrity": "sha512-DtGg+0xiFhQIntSBRzL2fRQBnmtAVwXIDo4Qq46HPpObYquxMaZS4sb82U9nH91qJrlosC1wa9gwr0QyL/HypA==", "requires": { "graceful-fs": "^4.1.2", "mkdirp": "~0.5.0" diff --git a/package.json b/package.json index 45ebd69d1d907..c3451f79f8aff 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "ci-info": "^2.0.0", "cli-columns": "^3.1.2", "cli-table3": "^0.5.1", - "cmd-shim": "^3.0.2", + "cmd-shim": "^3.0.3", "columnify": "~1.5.4", "config-chain": "^1.1.12", "detect-indent": "~5.0.0",