From 0fdda167494fd1e4f24482fc3e98f19328c813ed Mon Sep 17 00:00:00 2001 From: Aidan Delaney Date: Mon, 4 Mar 2024 07:13:06 +0000 Subject: [PATCH] Return an image even if inaccessible 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 --- pkg/client/common.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/client/common.go b/pkg/client/common.go index a92927b9d1..d3c67d882b 100644 --- a/pkg/client/common.go +++ b/pkg/client/common.go @@ -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 {