diff options
author | isaacs <i@izs.me> | 2010-05-03 01:52:13 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-05-03 05:07:49 +0400 |
commit | 6e9604ed63b944bd4269f255537231d76747259a (patch) | |
tree | e7f30cd1bbb92ccdcc3db9481ff3030d26673ffb /cli.js | |
parent | 5199ca30e51e9f182d586dc168f1bb2091157a88 (diff) |
Stop parsing flags when you hit --
Diffstat (limited to 'cli.js')
-rwxr-xr-x | cli.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |