Skip to content

Commit 05d58c1

Browse files
author
Skr00b@!!
authored
die if you can't find roles for the team name (#15)
1 parent fd0f186 commit 05d58c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/InstallFintorc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ S3.getObject(s3GetParams, (err,data) => {
130130
resolve(fintorcHash)
131131
}
132132
});
133+
}).then(function(fintorcHash) {
134+
if (Object.keys(fintorcHash.roles).length === 0) {
135+
throw(new Error("I couldn't find any roles!! Are you sure you typed in the right team name??"));
136+
} else {
137+
return fintorcHash;
138+
}
133139
}).then(setFileName).then(writeFile).catch(printError);
134140
//console.log("got json:");
135141
//console.log(JSON.stringify(allAccountsJson, null, " "));

0 commit comments

Comments
 (0)