Skip to content

Commit

Permalink
publish-prereleases: Exit if CircleCI request fails (#26100)
Browse files Browse the repository at this point in the history
If the publish-prereleases command fails to access CircleCI, it will now
exit with a message instead of hanging indefinitely.
  • Loading branch information
acdlite authored Feb 3, 2023
1 parent 2ef2414 commit 855b77c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/release/publish-using-ci-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ async function main() {
}
);

if (!pipelineResponse.ok) {
console.error(
theme.error(
`Failed to access CircleCI. Responded with status: ${pipelineResponse.status}`
)
);
process.exit(1);
}

const pipelineJSON = await pipelineResponse.json();
const pipelineID = pipelineJSON.id;

Expand Down

0 comments on commit 855b77c

Please sign in to comment.