Skip to content

Commit 29c5d5d

Browse files
committed
If stages tag is missing, stop and print error
1 parent 553a2a1 commit 29c5d5d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/parser.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ export class Parser {
6262
orderedYml.unshift({});
6363
const gitlabData = deepExtend.apply(this, orderedYml);
6464

65+
// 'stages' missing, throw error
66+
if (!gitlabData.stages) {
67+
console.error(`${c.red("'stages' tag is missing")}`);
68+
process.exit(1);
69+
}
70+
6571
// Generate stages
6672
for (const value of gitlabData.stages) {
6773
this.stages.set(value, new Stage(value));

0 commit comments

Comments
 (0)