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.
Andrew Clark committed
Feb 2, 2023 at 19:20 UTC
855b77c9bbee347735efcd626dda362db2ffae1d
1 file changed
+9
scripts/release/publish-using-ci-workflow.js
+9
@@ -99,6 +99,15 @@ async function main() {
99
}
100
);
101
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
+
111
const pipelineJSON = await pipelineResponse.json();
112
const pipelineID = pipelineJSON.id;
113