Skip to content

Commit

Permalink
fix: 🐞 fix missing exit code when having errors
Browse files Browse the repository at this point in the history
fix missing exit code when having errors
  • Loading branch information
Tal Rofe committed Apr 22, 2022
1 parent c429d50 commit e8bec1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/app/functions/lint-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,9 @@ export const lintFiles = async (
await outputFile(configuration.outputFile, errors, warnings);
}

if (errors.length > 0) {
return 1;
}

return 0;
};
4 changes: 4 additions & 0 deletions src/modules/core/functions/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,8 @@ export const lint = async (
if (configuration.outputFile) {
await outputFile(configuration.outputFile, errors, warnings);
}

if (errors.length > 0) {
process.exit(1);
}
};

0 comments on commit e8bec1d

Please sign in to comment.