Skip to content

Commit

Permalink
die if you can't find roles for the team name (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skr00b@!! authored Aug 17, 2018
1 parent fd0f186 commit 05d58c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/InstallFintorc.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ S3.getObject(s3GetParams, (err,data) => {
resolve(fintorcHash)
}
});
}).then(function(fintorcHash) {
if (Object.keys(fintorcHash.roles).length === 0) {
throw(new Error("I couldn't find any roles!! Are you sure you typed in the right team name??"));
} else {
return fintorcHash;
}
}).then(setFileName).then(writeFile).catch(printError);
//console.log("got json:");
//console.log(JSON.stringify(allAccountsJson, null, " "));
Expand Down

0 comments on commit 05d58c1

Please sign in to comment.