File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ async function pullWithDockerBinary(
4848 password : string | undefined ,
4949 platform : string | undefined ,
5050) : Promise < boolean > {
51- let pullAndSaveSuccessful = false ;
5251 try {
5352 if ( username || password ) {
5453 debug (
@@ -57,13 +56,12 @@ async function pullWithDockerBinary(
5756 }
5857 await docker . pullCli ( targetImage , { platform } ) ;
5958 await docker . save ( targetImage , saveLocation ) ;
60- return ( pullAndSaveSuccessful = true ) ;
59+ return true ;
6160 } catch ( err ) {
6261 debug ( `couldn't pull ${ targetImage } using docker binary: ${ err . message } ` ) ;
63-
6462 handleDockerPullError ( err . stderr , platform ) ;
6563
66- return pullAndSaveSuccessful ;
64+ return false ;
6765 }
6866}
6967
@@ -81,10 +79,9 @@ function handleDockerPullError(err: string, platform?: string) {
8179 "manifest unknown" ,
8280 ] ;
8381 if ( unknownManifestConditions . some ( ( value ) => err . includes ( value ) ) ) {
84- if ( platform ) {
85- throw new Error ( `The image does not exist for ${ platform } ` ) ;
86- }
87- throw new Error ( `The image does not exist for the current platform` ) ;
82+ throw new Error (
83+ `The image does not exist for ${ platform ?? "the current platform" } ` ,
84+ ) ;
8885 }
8986
9087 if ( err . includes ( "invalid reference format" ) ) {
You can’t perform that action at this time.
0 commit comments