Skip to content

Commit 95ff733

Browse files
committed
If rules are unset iterate empty array
1 parent 2c1ca81 commit 95ff733

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/job.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class Job {
125125
}
126126

127127
public async initRules() {
128-
for (const rule of this.rules) {
128+
for (const rule of this.rules || []) {
129129
try {
130130
if (rule['if']) {
131131
const output = childProcess.execSync(`[ ${rule['if']} ] && exit 0 || exit 1`, {cwd: this.cwd, env: this.getEnvs(), shell: 'bash'});

0 commit comments

Comments
 (0)