File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -70,15 +70,21 @@ export async function prepareVSCodeAndExecuteTests(
7070async function installExtensions ( extensionIds : string [ ] , vscodeCli : string , vscodeArgs : string [ ] ) : Promise < void > {
7171 for ( const extensionId of extensionIds ) {
7272 // Workaround for https://github.com/microsoft/vscode/issues/256031 to retry installing the extension with a delay.
73+ let installError : any | undefined = undefined ;
7374 for ( let attempts = 0 ; attempts < 5 ; attempts ++ ) {
7475 try {
7576 await installExtension ( extensionId , vscodeCli , vscodeArgs ) ;
76- return ;
77+ break ;
7778 } catch ( error ) {
7879 console . warn ( `Failed to install extension ${ extensionId } ; retrying: ${ error } ` ) ;
80+ installError = error ;
7981 await new Promise ( ( resolve ) => setTimeout ( resolve , 2000 ) ) ;
8082 }
8183 }
84+
85+ if ( installError ) {
86+ throw installError ;
87+ }
8288 }
8389
8490 console . log ( ) ;
You can’t perform that action at this time.
0 commit comments