Skip to content

Commit 5be4099

Browse files
authored
fix(ui-components): throw on failed publish (#8093)
Signed-off-by: Aviv Keller <[email protected]>
1 parent 0d41076 commit 5be4099

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/ui-components/scripts/publish.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ await writeFile(
1818
);
1919

2020
// Now, publish the generated `dist` folder
21-
spawnSync('pnpm', ['publish', '--no-git-checks'], {
21+
const { status, error } = spawnSync('pnpm', ['publish', '--no-git-checks'], {
2222
cwd: 'dist',
2323
stdio: 'inherit',
2424
});
25+
26+
if (error) {
27+
throw error;
28+
}
29+
30+
process.exitCode = status;

0 commit comments

Comments
 (0)