fix: report unexpected setup failures (#895)

## Summary
- add top-level uncaughtException and unhandledRejection handlers for
the setup entrypoint
- report unexpected failures through core.setFailed with stack/context
- regenerate the committed setup bundle
This commit is contained in:
Kevin Stillhammer
2026-05-31 11:17:46 +02:00
committed by GitHub
parent 8dc20b2aca
commit feda7fc6a9
2 changed files with 36 additions and 0 deletions
Generated Vendored
+16
View File
@@ -97406,6 +97406,22 @@ function getResolutionStrategy() {
// src/setup-uv.ts
var sourceDir = __dirname;
function formatUnexpectedFailure(error2) {
if (error2 instanceof Error) {
return error2.stack ?? error2.message;
}
return String(error2);
}
function failUnexpectedly(event, error2) {
setFailed(`${event}: ${formatUnexpectedFailure(error2)}`);
process.exit(1);
}
process.on("uncaughtException", (error2) => {
failUnexpectedly("Uncaught exception", error2);
});
process.on("unhandledRejection", (reason) => {
failUnexpectedly("Unhandled promise rejection", reason);
});
async function getPythonVersion(inputs) {
if (inputs.pythonVersion !== "") {
return inputs.pythonVersion;