From 7b14be229450878be6f888f0ab8bdfef76c0f607 Mon Sep 17 00:00:00 2001 From: Kamil Burzynski Date: Fri, 9 Oct 2015 19:17:03 +0200 Subject: [PATCH] Fixed stage setting when stage prompt is used for `jaws deploy endpoint` --- lib/commands/deploy_endpoint.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/commands/deploy_endpoint.js b/lib/commands/deploy_endpoint.js index 23a44159b..d1975ad00 100644 --- a/lib/commands/deploy_endpoint.js +++ b/lib/commands/deploy_endpoint.js @@ -143,7 +143,12 @@ CMD.prototype._promptStage = Promise.method(function() { }); } - return JawsCli.select('Select a stage to deploy to: ', choices, false); + return JawsCli.select('Select a stage to deploy to: ', choices, false) + .then(function(selectedStages){ + if( selectedStages && (selectedStages.length > 0) ) { + _this._stage = selectedStages[0].value; + } + }); }); /**