From ad3d075bb9b12e8d8d32723546c99804a5d4c72f Mon Sep 17 00:00:00 2001 From: Joe Walker Date: Mon, 13 Dec 2010 15:32:01 +0000 Subject: [PATCH] fix failure to merge args for single text param --- plugins/cockpit/lib/cli.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/cockpit/lib/cli.js b/plugins/cockpit/lib/cli.js index 169a5983..68af68e7 100644 --- a/plugins/cockpit/lib/cli.js +++ b/plugins/cockpit/lib/cli.js @@ -373,7 +373,7 @@ Requisition.prototype = { }, this); } - this.assignmentCount = Object.keys(this._assignments); + this.assignmentCount = Object.keys(this._assignments).length; }, /** @@ -626,7 +626,7 @@ oop.inherits(CliRequisition, Requisition); // Special case: if there is only 1 parameter, and that's of type // text we put all the params into the first param - if (this.assignmentCount == 1) { + if (this.assignmentCount === 1) { var assignment = this.getAssignment(0); if (assignment.param.type.name === 'text') { assignment.setArgument(Argument.merge(args));