diff --git a/lib/defaults/actions/ResourcesDeploy.js b/lib/defaults/actions/ResourcesDeploy.js index 806d93d8e..3f268a892 100644 --- a/lib/defaults/actions/ResourcesDeploy.js +++ b/lib/defaults/actions/ResourcesDeploy.js @@ -59,12 +59,18 @@ ex: let _this = this, spinner = JawsCLI.spinner(); - JawsUtils.jawsDebug('stage and region param', stageRegion); - - if(evt.stage && evt.region) { - _this.evt = evt; + if (_this.Jaws.cli) { + + // Add options to evt + _this.evt = _this.Jaws.cli.options; + + // Add region & stage from params. + _this.evt.stage = _this.Jaws.cli.params[0]; + _this.evt.region = _this.Jaws.cli.params[1]; + } + return this.Jaws.validateProject() .bind(_this) .then(_this._promptStageRegion) diff --git a/lib/defaults/defaults.json b/lib/defaults/defaults.json index fbbe26d19..50871e86f 100644 --- a/lib/defaults/defaults.json +++ b/lib/defaults/defaults.json @@ -75,6 +75,10 @@ { "path": "./defaults/actions/EnvUnset.js", "config": {} + }, + { + "path": "./defaults/actions/ResourcesDeploy.js", + "config": {} } ] }