Skip to content

Commit

Permalink
Return an image even if inaccessible
Browse files Browse the repository at this point in the history
When all run images are inaccessible, still return a run image.  Pack
will then provide a better error message to the end-user.

Signed-off-by: Aidan Delaney <[email protected]>
  • Loading branch information
AidanDelaney committed Mar 4, 2024
1 parent 1e41857 commit 0fdda16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/client/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ func getBestRunMirror(registry string, runImage string, mirrors []string, prefer
}
}

return runImageList[0]
if len(runImageList) > 0 {
return runImageList[0]
}

return runImage
}

func filterImageList(imageList []string, accessChecker AccessChecker) []string {
Expand Down

0 comments on commit 0fdda16

Please sign in to comment.