Permalink
Browse files

Merge pull request #38 from mimetnet/master

Allow opt value to start with a hyphen (-)
  • Loading branch information...
2 parents d074654 + 8266047 commit 32c7013716c3cb5ce1cdf5486aacb26fb84c2d48 @chriso chriso committed Jul 31, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 cli.js
View
2 cli.js
@@ -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';
}

0 comments on commit 32c7013

Please sign in to comment.