diff --git a/src/taco-cli/cli/plugin.ts b/src/taco-cli/cli/plugin.ts index 5b7716ed..febcce0e 100644 --- a/src/taco-cli/cli/plugin.ts +++ b/src/taco-cli/cli/plugin.ts @@ -84,10 +84,19 @@ class Plugin extends kitComponentCommand.KitComponentCommand { } protected getCommandOptions(commandData: commands.ICommandData): Cordova.ICordovaPluginOptions { + + // Sanitize the --variable option flags + var variables: string[] = commandData.options["variable"] || []; + var cli_variables: Cordova.IKeyValueStore = {} + variables.forEach(function(variable: string): void { + var keyval: any[] = variable.split("="); + cli_variables[keyval[0].toUpperCase()] = keyval[1]; + }); + return { searchpath: commandData.options["searchpath"], noregistry: commandData.options["noregistry"], - cli_variables: commandData.options["cli_variables"], + cli_variables: cli_variables, browserify: commandData.options["browserify"], link: commandData.options["link"], save: commandData.options["save"],