diff --git a/node_modules/read-cmd-shim/index.js b/node_modules/read-cmd-shim/index.js index f565ababe4e03..3af2512f6cb43 100644 --- a/node_modules/read-cmd-shim/index.js +++ b/node_modules/read-cmd-shim/index.js @@ -4,11 +4,18 @@ var fs = require('graceful-fs') function extractPath (path, cmdshimContents) { if (/[.]cmd$/.test(path)) { return extractPathFromCmd(cmdshimContents) + } else if (/[.]ps1$/.test(path)) { + return extractPathFromPowershell(cmdshimContents) } else { return extractPathFromCygwin(cmdshimContents) } } +function extractPathFromPowershell (cmdshimContents) { + var matches = cmdshimContents.match(/"[$]basedir[/]([^"]+?)"\s+[$]args/) + return matches && matches[1] +} + function extractPathFromCmd (cmdshimContents) { var matches = cmdshimContents.match(/"%(?:~dp0|dp0%)\\([^"]+?)"\s+%[*]/) return matches && matches[1] diff --git a/node_modules/read-cmd-shim/package.json b/node_modules/read-cmd-shim/package.json index df2fe27e7b170..101651109d4ff 100644 --- a/node_modules/read-cmd-shim/package.json +++ b/node_modules/read-cmd-shim/package.json @@ -1,29 +1,29 @@ { - "_from": "read-cmd-shim@1.0.4", - "_id": "read-cmd-shim@1.0.4", + "_from": "read-cmd-shim@1.0.5", + "_id": "read-cmd-shim@1.0.5", "_inBundle": false, - "_integrity": "sha512-Pqpl3qJ/QdOIjRYA0q5DND/gLvGOfpIz/fYVDGYpOXfW/lFrIttmLsBnd6IkyK10+JHU9zhsaudfvrQTBB9YFQ==", + "_integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==", "_location": "/read-cmd-shim", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "read-cmd-shim@1.0.4", + "raw": "read-cmd-shim@1.0.5", "name": "read-cmd-shim", "escapedName": "read-cmd-shim", - "rawSpec": "1.0.4", + "rawSpec": "1.0.5", "saveSpec": null, - "fetchSpec": "1.0.4" + "fetchSpec": "1.0.5" }, "_requiredBy": [ "#USER", "/", "/gentle-fs" ], - "_resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.4.tgz", - "_shasum": "b4a53d43376211b45243f0072b6e603a8e37640d", - "_spec": "read-cmd-shim@1.0.4", - "_where": "/Users/claudiahdz/npm/cli", + "_resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz", + "_shasum": "87e43eba50098ba5a32d0ceb583ab8e43b961c16", + "_spec": "read-cmd-shim@1.0.5", + "_where": "/Users/ruyadorno/Documents/workspace/cli", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org", @@ -59,5 +59,5 @@ "pretest": "standard", "test": "tap test/*.js --100" }, - "version": "1.0.4" + "version": "1.0.5" } diff --git a/package-lock.json b/package-lock.json index 125f37f22e6c3..f8032f1f15072 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4845,9 +4845,9 @@ } }, "read-cmd-shim": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.4.tgz", - "integrity": "sha512-Pqpl3qJ/QdOIjRYA0q5DND/gLvGOfpIz/fYVDGYpOXfW/lFrIttmLsBnd6IkyK10+JHU9zhsaudfvrQTBB9YFQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz", + "integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==", "requires": { "graceful-fs": "^4.1.2" } diff --git a/package.json b/package.json index c9c6f2ac4dad6..7a7192a9ab1a8 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "query-string": "^6.8.2", "qw": "~1.0.1", "read": "~1.0.7", - "read-cmd-shim": "^1.0.4", + "read-cmd-shim": "^1.0.5", "read-installed": "~4.0.3", "read-package-json": "^2.1.0", "read-package-tree": "^5.3.1",