Skip to content

Commit

Permalink
cli.js :: allow opt value to start with a hyphen (-)
Browse files Browse the repository at this point in the history
  • Loading branch information
mimetnet committed Apr 16, 2013
1 parent d103af2 commit 8266047
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
//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';
}

Expand Down

0 comments on commit 8266047

Please sign in to comment.