Skip to content

Commit 47e03e0

Browse files
committed
fix(build): reject promise on failed build
fix #15
1 parent 9585237 commit 47e03e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/api/builds.ts

+7
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ export function waitForSuccessfulBuild(
159159
if (isBuilt) {
160160
break;
161161
}
162+
163+
const hasFailed = status === 'failed';
164+
if (hasFailed) {
165+
reject(status);
166+
return;
167+
}
168+
162169
if (eventEmitter) {
163170
eventEmitter.emit('status-update', {
164171
status: DeployStatus.BUILDING,

0 commit comments

Comments
 (0)