Skip to content

Commit

Permalink
Merge pull request #38 from mimetnet/master
Browse files Browse the repository at this point in the history
Allow opt value to start with a hyphen (-)
  • Loading branch information
chriso committed Jul 31, 2013
2 parents d074654 + 8266047 commit 32c7013
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli.js
Expand Up @@ -722,7 +722,7 @@ cli.getValue = function (default_val, validate_func, err_msg) {


//If there's no args left or the next arg is an opt, return the //If there's no args left or the next arg is an opt, return the
//default value (if specified) - otherwise fail //default value (if specified) - otherwise fail
if (!argv.length || argv[0][0] === '-') { if (!argv.length || (argv[0].length === 1 && argv[0][0] === '-')) {
throw 'No value'; throw 'No value';
} }


Expand Down

0 comments on commit 32c7013

Please sign in to comment.