File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ export class Utils {
454454 try {
455455 await Utils . spawn ( `${ argv . containerExecutable } volume create ${ gclRegistryCertVol } ` . split ( " " ) ) ;
456456 } catch ( err ) {
457- if ( err instanceof Error && "exitCode" in err && err . exitCode !== 125 )
457+ if ( err instanceof Error && ! err . message . endsWith ( "already exists" ) )
458458 throw err ;
459459 }
460460
@@ -483,16 +483,15 @@ export class Utils {
483483 try {
484484 await Utils . spawn ( [ argv . containerExecutable , "volume" , "create" , gclRegistryDataVol ] ) ;
485485 } catch ( err ) {
486- // rethrow error if not 'already exists' (exitCode 125)
487- if ( err instanceof Error && "exitCode" in err && err . exitCode !== 125 )
486+ if ( err instanceof Error && ! err . message . endsWith ( "already exists" ) )
488487 throw err ;
489488 }
490489
491490 // create network
492491 try {
493492 await Utils . spawn ( [ argv . containerExecutable , "network" , "create" , gclRegistryNet ] ) ;
494493 } catch ( err ) {
495- if ( err instanceof Error && "exitCode" in err && err . exitCode !== 125 )
494+ if ( err instanceof Error && ! err . message . includes ( "already exists" ) )
496495 throw err ;
497496 }
498497
You can’t perform that action at this time.
0 commit comments