Fix root action double error logs (#724)

This commit is contained in:
Bjorn Lu
2026-08-22 10:32:21 +00:00
committed by GitHub
parent d7669c894a
commit 36f529f13a
2 changed files with 13 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@changesets/action": patch
---
Fix root action double error logs
+8 -5
View File
@@ -10,7 +10,13 @@ import {
validateChangesetsCliVersion, validateChangesetsCliVersion,
} from "./utils.ts"; } from "./utils.ts";
(async () => { try {
await main();
} catch (err) {
core.setFailed((err as Error).message);
}
async function main() {
const cwd = getOptionalInput("cwd") || process.cwd(); const cwd = getOptionalInput("cwd") || process.cwd();
await validateChangesetsCliVersion(cwd); await validateChangesetsCliVersion(cwd);
@@ -131,7 +137,4 @@ import {
return; return;
} }
} }
})().catch((err) => { }
core.error(err);
core.setFailed(err.message);
});