Skip to content

Commit

Permalink
fix for the dot test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Sep 12, 2013
1 parent b465514 commit 6a095f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Expand Up @@ -105,8 +105,10 @@ module.exports = function (args, opts) {

var key = arg.slice(-1)[0];
if (!broken && key !== '-') {

if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
if (args[i+1] === '--') {
setArg(key, true);
}
else if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
&& !flags.bools[key]
&& (aliases[key] ? !flags.bools[aliases[key]] : true)) {
setArg(key, args[i+1]);
Expand Down

0 comments on commit 6a095f1

Please sign in to comment.