From d6cdb71e2bedd8dc27df996e7bd8a97fb0b60a33 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 15 Jan 2026 00:45:50 +0100 Subject: [PATCH] cli/command: RetrieveAuthTokenFromImage: remove redundant conditions Signed-off-by: Sebastiaan van Stijn --- cli/command/registry.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cli/command/registry.go b/cli/command/registry.go index 87c81c6da5da..452e2d7354cc 100644 --- a/cli/command/registry.go +++ b/cli/command/registry.go @@ -200,7 +200,7 @@ func RetrieveAuthTokenFromImage(cfg *configfile.ConfigFile, image string) (strin return "", err } - encodedAuth, err := authconfig.Encode(registrytypes.AuthConfig{ + return authconfig.Encode(registrytypes.AuthConfig{ Username: authConfig.Username, Password: authConfig.Password, ServerAddress: authConfig.ServerAddress, @@ -210,10 +210,6 @@ func RetrieveAuthTokenFromImage(cfg *configfile.ConfigFile, image string) (strin IdentityToken: authConfig.IdentityToken, RegistryToken: authConfig.RegistryToken, }) - if err != nil { - return "", err - } - return encodedAuth, nil } // getAuthConfigKey special-cases using the full index address of the official