Skip to content

Commit

Permalink
game-ci#578 Improve error logging for missing build results in logs
Browse files Browse the repository at this point in the history
Writing the same error as if there would have been an error is confusing and harder to debug. Additionally, validating build results through the logs is not too intuitive, therefore providing information on the missing build result section should help clarify the problem.
  • Loading branch information
JohannesDeml committed Oct 8, 2023
1 parent a13443a commit 7280111
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/model/exec-with-error-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export async function execWithErrorCheck(
throw new Error(`There was an error building the project. Please read the logs for details.`);
}
} else {
throw new Error(`There was an error building the project. Please read the logs for details.`);
throw new Error(
`Could not find build results section in the logs. There was either a build error or the results were not logged from the script.`,
);
}

return result.exitCode;
Expand Down

0 comments on commit 7280111

Please sign in to comment.