Permalink
Browse files

cli.js :: allow opt value to start with a hyphen (-)

  • Loading branch information...
1 parent d103af2 commit 8266047c423f1da5406ced5be2d362501e750cde @mimetnet mimetnet committed Apr 16, 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 8266047

Please sign in to comment.