Skip to content
Myr

Fix issue #56

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Leftover arguments need to be pushed back onto the args stack. Makes sure that options don't strip of arguments they shouldn't

authored by Carl Orthlieb · committed by Carl Orthlieb · parent 7234489 · Browse files · 1 file+6 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−0 removed

  • other:+6 added−0 removed

1 file+6 added−0 removed

modified:lib/commander.js+6 added
211 unmodified lines
212 if (parsed.unknown.length > 0) { 213 self.unknownOption(parsed.unknown[0]);214 }215 216 // Leftover arguments need to be pushed back onto the args stack217 // Fixes issue #56218 if (parsed.args.length > 0) {219 args = parsed.args.concat(args);220 }221 222 self.args.forEach(function(arg, i){223 if (arg.required && null == args[i]) {224 self.missingArgument(arg.name);225 }
812 unmodified lines