From 6e9604ed63b944bd4269f255537231d76747259a Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 2 May 2010 14:52:13 -0700 Subject: Stop parsing flags when you hit -- --- cli.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli.js') 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 -- cgit v1.2.3