Skip to content

Commit

Permalink
Set exit code on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-c-martin authored Oct 17, 2024
1 parent b752c08 commit 65e11bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generator/cmd/generateall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ executeSynchronous(async () => {
pkg.result = 'failed';
console.log(colors.red(`Caught exception processing autogenlist entry ${autoGenConfig.basePath}.`));
console.log(colors.red(`${(error as Error)?.stack || error}`));


// return a non-zero exit code to mark the process as failed
process.exitCode = 1;
// Use markdown formatting as this summary will be included in the PR description
logOut(summaryLogger,
`<details>
Expand All @@ -118,6 +120,8 @@ executeSynchronous(async () => {
packages.push(pkg);
}
} catch (error) {
// return a non-zero exit code to mark the process as failed
process.exitCode = 1;
// Use markdown formatting as this summary will be included in the PR description
// This error usually indicates that a file has not been found (readme)
logOut(summaryLogger,
Expand Down

0 comments on commit 65e11bc

Please sign in to comment.