Skip to content

Commit

Permalink
another swap of .test for .match
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Feb 9, 2014
1 parent 8ef0bdf commit d1da408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = function (args, opts) {
else if (/^--.+/.test(arg)) {
var key = arg.match(/^--(.+)/)[1];
var next = args[i + 1];
if (next !== undefined && !next.match(/^-/)
if (next !== undefined && !/^-/.test(next)
&& !flags.bools[key]
&& (aliases[key] ? !flags.bools[aliases[key]] : true)) {
setArg(key, next);
Expand Down

0 comments on commit d1da408

Please sign in to comment.