Skip to content

Commit 855b77c

Browse files
authored
publish-prereleases: Exit if CircleCI request fails (#26100)
If the publish-prereleases command fails to access CircleCI, it will now exit with a message instead of hanging indefinitely.
1 parent 2ef2414 commit 855b77c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/release/publish-using-ci-workflow.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ async function main() {
9999
}
100100
);
101101

102+
if (!pipelineResponse.ok) {
103+
console.error(
104+
theme.error(
105+
`Failed to access CircleCI. Responded with status: ${pipelineResponse.status}`
106+
)
107+
);
108+
process.exit(1);
109+
}
110+
102111
const pipelineJSON = await pipelineResponse.json();
103112
const pipelineID = pipelineJSON.id;
104113

0 commit comments

Comments
 (0)