aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/play
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-10-28 13:16:42 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-10-30 05:34:04 -0400
commit831d7fb0d7ee007fc04b1b0ff24b77c7d5635f5e (patch)
tree2888d983aea9538c421bcb2cbfce818a1904dd7a /cmd/podman/play
parent228396a99dc88fc828f23d4072a46ca8de90282f (diff)
downloadpodman-831d7fb0d7ee007fc04b1b0ff24b77c7d5635f5e.tar.gz
podman-831d7fb0d7ee007fc04b1b0ff24b77c7d5635f5e.tar.bz2
podman-831d7fb0d7ee007fc04b1b0ff24b77c7d5635f5e.zip
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 <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/play')
-rw-r--r--cmd/podman/play/kube.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go
index 6072ea80c..feb112ad7 100644
--- a/cmd/podman/play/kube.go
+++ b/cmd/podman/play/kube.go
@@ -10,7 +10,6 @@ import (
"github.com/containers/podman/v2/cmd/podman/utils"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/containers/podman/v2/pkg/util"
- "github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -75,7 +74,7 @@ func kube(cmd *cobra.Command, args []string) error {
}
if kubeOptions.Authfile != "" {
if _, err := os.Stat(kubeOptions.Authfile); err != nil {
- return errors.Wrapf(err, "error getting authfile %s", kubeOptions.Authfile)
+ return err
}
}
if kubeOptions.CredentialsCLI != "" {