Skip to content

Commit

Permalink
fix validation for non existing aws profile. Closes serverless#1005
Browse files Browse the repository at this point in the history
  • Loading branch information
eahefnawy authored and Ilya Shindyapin committed Aug 24, 2016
1 parent c809178 commit a87ad47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/actions/StageCreate.js
Expand Up @@ -204,8 +204,8 @@ usage: serverless stage create`,

// Select A Profile
_this.profiles = _this.provider.getAllProfiles();

if (!_this.profiles) throw new SError(`You have no profiles for ${_this.provider.getProviderName()} on this machine. Please re-run this command and create a new profile.`);
if (Object.keys(_this.profiles).length === 0) throw new SError(`You have no profiles for ${_this.provider.getProviderName()} on this machine. Please re-run this command and create a new profile.`);

// Prompt: profile select
let choices = [];
Expand Down

0 comments on commit a87ad47

Please sign in to comment.