From 2c63b8439bbdc09203ea394ad2cf9352830861f0 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 10 Sep 2022 07:40:39 -0400 Subject: Fix stutters Podman adds an Error: to every error message. So starting an error message with "error" ends up being reported to the user as Error: error ... This patch removes the stutter. Also ioutil.ReadFile errors report the Path, so wrapping the err message with the path causes a stutter. Signed-off-by: Daniel J Walsh --- pkg/auth/auth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/auth') diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index dd934fabd..270cd4207 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -238,10 +238,10 @@ func authConfigsToAuthFile(authConfigs map[string]types.DockerAuthConfig) (strin return "", err } if _, err := tmpFile.Write([]byte{'{', '}'}); err != nil { - return "", fmt.Errorf("error initializing temporary auth file: %w", err) + return "", fmt.Errorf("initializing temporary auth file: %w", err) } if err := tmpFile.Close(); err != nil { - return "", fmt.Errorf("error closing temporary auth file: %w", err) + return "", fmt.Errorf("closing temporary auth file: %w", err) } authFilePath := tmpFile.Name() @@ -255,7 +255,7 @@ func authConfigsToAuthFile(authConfigs map[string]types.DockerAuthConfig) (strin // that all credentials are valid. They'll be used on demand // later. if err := imageAuth.SetAuthentication(&sys, key, config.Username, config.Password); err != nil { - return "", fmt.Errorf("error storing credentials in temporary auth file (key: %q / %q, user: %q): %w", authFileKey, key, config.Username, err) + return "", fmt.Errorf("storing credentials in temporary auth file (key: %q / %q, user: %q): %w", authFileKey, key, config.Username, err) } } -- cgit v1.2.3-54-g00ecf