Skip to content

Commit 69d684e

Browse files
committed
option parser fix
1 parent 29dd262 commit 69d684e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/cloud9/optparse.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ var Parser = module.exports = function(options) {
3939
}
4040

4141
this.parseArguments = function(argv) {
42+
argv = argv.concat();
4243
var arg, key, opt, opts = {}, opts_def = {};
43-
while (argv.length && (arg = argv.shift())) {
44+
while (argv.length && argv.length) {
45+
arg = argv.shift();
46+
if (!arg)
47+
continue;
4448
opt = this.$getArg(argv, arg);
4549
opts[opt.key] = opt.value;
4650
}

0 commit comments

Comments
 (0)