Skip to content

Commit

Permalink
catch error if job file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Oct 15, 2023
1 parent deab0e4 commit c954f4e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/cmd/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ async function run(
let jobFileExists = true;
const commands = [];
for (const job of jobs) {
const jobFile = await Deno.stat(`.fluentci/${job}.ts`);
if (!jobFile.isFile) {
try {
const jobFile = await Deno.stat(`.fluentci/${job}.ts`);
if (!jobFile.isFile) {
jobFileExists = false;
break;
}
} catch (_) {
jobFileExists = false;
break;
}
Expand Down

0 comments on commit c954f4e

Please sign in to comment.