From 831d7fb0d7ee007fc04b1b0ff24b77c7d5635f5e Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 28 Oct 2020 13:16:42 -0400 Subject: Stop excessive wrapping of errors Most of the builtin golang functions like os.Stat and os.Open report errors including the file system object path. We should not wrap these errors and put the file path in a second time, causing stuttering of errors when they get presented to the user. This patch tries to cleanup a bunch of these errors. Signed-off-by: Daniel J Walsh --- cmd/podman/images/pull.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmd/podman/images/pull.go') diff --git a/cmd/podman/images/pull.go b/cmd/podman/images/pull.go index 35ef80f3c..ab3b0a197 100644 --- a/cmd/podman/images/pull.go +++ b/cmd/podman/images/pull.go @@ -9,7 +9,6 @@ import ( "github.com/containers/podman/v2/cmd/podman/registry" "github.com/containers/podman/v2/pkg/domain/entities" "github.com/containers/podman/v2/pkg/util" - "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" ) @@ -104,7 +103,7 @@ func imagePull(cmd *cobra.Command, args []string) error { } if pullOptions.Authfile != "" { if _, err := os.Stat(pullOptions.Authfile); err != nil { - return errors.Wrapf(err, "error getting authfile %s", pullOptions.Authfile) + return err } } -- cgit v1.2.3-54-g00ecf