File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,15 @@ export async function prepareVSCodeAndExecuteTests(
6969
7070async function installExtensions ( extensionIds : string [ ] , vscodeCli : string , vscodeArgs : string [ ] ) : Promise < void > {
7171 for ( const extensionId of extensionIds ) {
72- try {
73- await installExtension ( extensionId , vscodeCli , vscodeArgs ) ;
74- } catch ( error ) {
75- console . warn ( `Failed to install extension; retrying ${ extensionId } : ${ error } ` ) ;
76- // Workaround for https://github.com/microsoft/vscode/issues/256031 to install extensions one at a time with a delay.
77- await new Promise ( ( resolve ) => setTimeout ( resolve , 2000 ) ) ;
78- await installExtension ( extensionId , vscodeCli , vscodeArgs ) ;
72+ // Workaround for https://github.com/microsoft/vscode/issues/256031 to retry installing the extension with a delay.
73+ for ( let attempts = 0 ; attempts < 5 ; attempts ++ ) {
74+ try {
75+ await installExtension ( extensionId , vscodeCli , vscodeArgs ) ;
76+ return ;
77+ } catch ( error ) {
78+ console . warn ( `Failed to install extension ${ extensionId } ; retrying: ${ error } ` ) ;
79+ await new Promise ( ( resolve ) => setTimeout ( resolve , 2000 ) ) ;
80+ }
7981 }
8082 }
8183
You can’t perform that action at this time.
0 commit comments