mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-09 00:05:28 +01:00
fix build issue when retrying after one cdn failure (#188939)
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -227,11 +227,15 @@ async function main(): Promise<void> {
|
||||
}
|
||||
|
||||
const promiseResults = await Promise.allSettled(uploadPromises);
|
||||
const rejectedPromiseResults = promiseResults.filter(result => result.status === 'rejected') as PromiseRejectedResult[];
|
||||
|
||||
for (const result of promiseResults) {
|
||||
if (result.status === 'rejected') {
|
||||
throw result.reason;
|
||||
}
|
||||
if (rejectedPromiseResults.length === 0) {
|
||||
console.log('All blobs successfully uploaded.');
|
||||
} if (rejectedPromiseResults[0].reason?.message?.includes('already exists')) {
|
||||
console.warn(rejectedPromiseResults[0].reason.message);
|
||||
console.log('Some blobs successfully uploaded.');
|
||||
} else {
|
||||
throw rejectedPromiseResults[0].reason;
|
||||
}
|
||||
|
||||
console.log('All blobs successfully uploaded.');
|
||||
|
||||
Reference in New Issue
Block a user