///<reference path="../../.d.ts"/>
"use strict";
import projectPropertyCommandBaseLib = require("./prop-command-base");

export class SetProjectPropertyCommand extends projectPropertyCommandBaseLib.ProjectPropertyCommandBase implements ICommand {
	constructor($staticConfig: IStaticConfig,
		$injector: IInjector) {
		super($staticConfig, $injector);
		this.$project.ensureProject();
	}

	canExecute(args: string[]): IFuture<boolean> {
			var property = args[0];
			var propertyValues = _.rest(args, 1);
			return this.$project.validateProjectProperty(property, propertyValues, "set");
	}

	execute(args: string[]): IFuture<void> {
		return	this.$project.updateProjectPropertyAndSave("set", args[0], _.rest(args, 1));
	}

	allowedParameters: ICommandParameter[] = [];
}
$injector.registerCommand("prop|set", SetProjectPropertyCommand);

///<reference path="../../.d.ts"/>
"use strict";
import projectPropertyCommandBaseLib = require("./prop-command-base");

export class SetProjectPropertyCommand extends projectPropertyCommandBaseLib.ProjectPropertyCommandBase implements ICommand {
	constructor($staticConfig: IStaticConfig,
		$injector: IInjector) {
		super($staticConfig, $injector);
		this.$project.ensureProject();
	}

	canExecute(args: string[]): IFuture<boolean> {
		return (() => {
			var property = args[0];
			var propertyValues = _.rest(args, 1);
			if(this.$project.validateProjectProperty(property, propertyValues, "set").wait()) {
				if(propertyValues.length === 1 && propertyValues[0]) {
					return true;
				}
			}

			return false;
		}).future<boolean>()();
	}

	execute(args: string[]): IFuture<void> {
		return	this.$project.updateProjectPropertyAndSave("set", args[0], _.rest(args, 1));
	}

	allowedParameters: ICommandParameter[] = [];
}
$injector.registerCommand("prop|set", SetProjectPropertyCommand);
--- 
+++ 
@@ -10,17 +10,9 @@
 	}
 
 	canExecute(args: string[]): IFuture<boolean> {
-		return (() => {
 			var property = args[0];
 			var propertyValues = _.rest(args, 1);
-			if(this.$project.validateProjectProperty(property, propertyValues, "set").wait()) {
-				if(propertyValues.length === 1 && propertyValues[0]) {
-					return true;
-				}
-			}
-
-			return false;
-		}).future<boolean>()();
+			return this.$project.validateProjectProperty(property, propertyValues, "set");
 	}
 
 	execute(args: string[]): IFuture<void> {
Allow setting of multiple values with prop set

`$ appbuilder prop set` should work for setting array values. Remove incorrect validation logic which was allowing only singe value to be used.

Fixes http://teampulse.telerik.com/view#item/289487
