Permalink
Browse files

log error if <key> or <value> not arg in config set

  • Loading branch information...
1 parent 461e5e4 commit 64075dbe0509747822cbba0261e878dd43a14d6a @gradus committed Jan 14, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/commands.js
View
2 lib/commands.js
@@ -28,7 +28,7 @@ exports.set = function (key, value, callback) {
var args = Array.prototype.slice.call(arguments);
callback = args.pop();
- if (args.length !== 2) {
+ if (args.indexOf(null) == 0 || args.indexOf(null) == 1){
cliConfig.app.log.error('You must pass both <key> and <value>');
return callback(true, true);
}

0 comments on commit 64075db

Please sign in to comment.