Skip to content

Commit a3389ec

Browse files
authored
Merge pull request #53 from Clarifai/moldovan/TP-674-throw-err
[TP-674] Fail fast when `stage` is invalid.
2 parents aef71c7 + 86c5c1d commit a3389ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gulpfile.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ const lintOptions = {
9797

9898
function getBuildVars() {
9999
const stageString = process.env.CLARIFAI_DEPLOY || gutil.env.stage || 'dev';
100+
if (!buildVars.hasOwnProperty(stageString)) {
101+
throw 'There are no defined build variables for stage `' + stageString + '`';
102+
}
103+
100104
return buildVars[stageString];
101105
}
102106

0 commit comments

Comments
 (0)