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.
This commit is contained in:
parent
2ef24145e4
commit
855b77c9bb
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue