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:
authorisaacs <i@izs.me>2012-06-23 02:09:06 +0400
committerisaacs <i@izs.me>2012-06-23 02:09:06 +0400
commit5e7e4da715332cf8d5e098c37b9c22eda0b5de83 (patch)
tree1abfae5adbdd833d82fc8c62b2dca177ac60f771
parentc8e89068f7c69ab0d60bdbee0b9ee0de0ba9f669 (diff)
windows: Correct the cmd shim paths
-rw-r--r--lib/utils/cmd-shim.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/utils/cmd-shim.js b/lib/utils/cmd-shim.js
index fc1954aac..828b63363 100644
--- a/lib/utils/cmd-shim.js
+++ b/lib/utils/cmd-shim.js
@@ -59,11 +59,12 @@ function writeShim (from, to, cb) {
}
function writeShim_ (from, to, prog, args, cb) {
- var shTarget = from
+ var shTarget = path.relative(path.dirname(to), from)
, target = shTarget.split("/").join("\\")
, longProg
- , shProg = prog
+ , shProg = prog.split("\\").join("/")
, shLongProg
+ shTarget = shTarget.split("\\").join("/")
args = args || ""
if (!prog) {
prog = "\"%~dp0\\" + target + "\""