Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2019-11-05 22:19:37 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2019-11-05 22:19:38 +0300
commitd3cb3abe8cee54bd2624acdcf8043932ef0d660a (patch)
treeea594e89fc6925b3dc2c4aabfcb00c1dbbbea7a2 /node_modules/read-cmd-shim
parent6700bfae560cc43234a57239ea7de678223d98c5 (diff)
read-cmd-shim@1.0.5
Diffstat (limited to 'node_modules/read-cmd-shim')
-rw-r--r--node_modules/read-cmd-shim/index.js7
-rw-r--r--node_modules/read-cmd-shim/package.json22
2 files changed, 18 insertions, 11 deletions
diff --git a/node_modules/read-cmd-shim/index.js b/node_modules/read-cmd-shim/index.js
index f565ababe..3af2512f6 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 df2fe27e7..101651109 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"
}