Skip to content

Commit 36f529f

Browse files
authored
Fix root action double error logs (#724)
1 parent d7669c8 commit 36f529f

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎.changeset/sunny-moons-appear.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@changesets/action": patch
3+
---
4+
5+
Fix root action double error logs

‎src/index.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ import {
1010
validateChangesetsCliVersion,
1111
} from "./utils.ts";
1212

13-
(async () => {
13+
try {
14+
await main();
15+
} catch (err) {
16+
core.setFailed((err as Error).message);
17+
}
18+
19+
async function main() {
1420
const cwd = getOptionalInput("cwd") || process.cwd();
1521
await validateChangesetsCliVersion(cwd);
1622

@@ -131,7 +137,4 @@ import {
131137
return;
132138
}
133139
}
134-
})().catch((err) => {
135-
core.error(err);
136-
core.setFailed(err.message);
137-
});
140+
}

0 commit comments

Comments
 (0)