diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-09-10 07:40:39 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-09-10 07:52:00 -0400 |
commit | 2c63b8439bbdc09203ea394ad2cf9352830861f0 (patch) | |
tree | 39b9d8d061bc248e4dbeb6445c2ad0c99b048ae1 /cmd/podman/images/build.go | |
parent | 2d8417d86a7edf11bce5527f311bb951a651d40e (diff) | |
download | podman-2c63b8439bbdc09203ea394ad2cf9352830861f0.tar.gz podman-2c63b8439bbdc09203ea394ad2cf9352830861f0.tar.bz2 podman-2c63b8439bbdc09203ea394ad2cf9352830861f0.zip |
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 <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/images/build.go')
-rw-r--r-- | cmd/podman/images/build.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 837b233f4..2b24c1cff 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -222,7 +222,7 @@ func build(cmd *cobra.Command, args []string) error { // The context directory could be a URL. Try to handle that. tempDir, subDir, err := buildahDefine.TempDirForURL("", "buildah", args[0]) if err != nil { - return fmt.Errorf("error prepping temporary context directory: %w", err) + return fmt.Errorf("prepping temporary context directory: %w", err) } if tempDir != "" { // We had to download it to a temporary directory. @@ -237,7 +237,7 @@ func build(cmd *cobra.Command, args []string) error { // Nope, it was local. Use it as is. absDir, err := filepath.Abs(args[0]) if err != nil { - return fmt.Errorf("error determining path to directory %q: %w", args[0], err) + return fmt.Errorf("determining path to directory %q: %w", args[0], err) } contextDir = absDir } @@ -253,7 +253,7 @@ func build(cmd *cobra.Command, args []string) error { } absFile, err := filepath.Abs(containerFiles[i]) if err != nil { - return fmt.Errorf("error determining path to file %q: %w", containerFiles[i], err) + return fmt.Errorf("determining path to file %q: %w", containerFiles[i], err) } contextDir = filepath.Dir(absFile) containerFiles[i] = absFile |