From 6710e50ead5e581ee7b12c3dd5678cf0e66a0913 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Thu, 30 Nov 2023 21:44:10 -0800 Subject: [PATCH] Fix issue with pulling image credentials --- internal/infra/run.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/infra/run.go b/internal/infra/run.go index bfabc8f..1f6b0c8 100644 --- a/internal/infra/run.go +++ b/internal/infra/run.go @@ -489,11 +489,12 @@ func pullImage(ctx context.Context, cli *client.Client, image string) error { log.Printf("Failed to find credentials for pulling image: %s\n.", image) } - encodedAuth, err := privilegeFunc() - if err != nil { - return fmt.Errorf("failed to get credentials for %v: %w", image, err) + if privilegeFunc == nil { + return fmt.Errorf("failed to get credentials to pull image: %s", image) } + encodedAuth, _ := privilegeFunc() + log.Printf("pulling image: %s\n", image) out, err := cli.ImagePull(ctx, image, types.ImagePullOptions{ RegistryAuth: encodedAuth,