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
path: root/cli.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-05-03 01:52:13 +0400
committerisaacs <i@izs.me>2010-05-03 05:07:49 +0400
commit6e9604ed63b944bd4269f255537231d76747259a (patch)
treee7f30cd1bbb92ccdcc3db9481ff3030d26673ffb /cli.js
parent5199ca30e51e9f182d586dc168f1bb2091157a88 (diff)
Stop parsing flags when you hit --
Diffstat (limited to 'cli.js')
-rwxr-xr-xcli.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli.js b/cli.js
index 6e02297ae..cad5e74cd 100755
--- a/cli.js
+++ b/cli.js
@@ -17,6 +17,7 @@ var fs = require("fs")
, key
, arglist = []
, command
+ , flagsDone
log(sys.inspect(argv), "cli")
@@ -27,9 +28,10 @@ while (arg = argv.shift()) {
key = null
}
command = arg
- } else if (arg.substr(0, 2) === "--") {
+ } else if (!flagsDone && arg.substr(0, 2) === "--") {
if (key) conf[key] = true
key = arg.substr(2)
+ flagsDone = (key === "")
} else if (key) {
conf[key] = arg
key = null