summaryrefslogtreecommitdiff
path: root/cmd/podman/generate/kube.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/generate/kube.go')
-rw-r--r--cmd/podman/generate/kube.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/podman/generate/kube.go b/cmd/podman/generate/kube.go
index c4c92799c..7bfc3dcf7 100644
--- a/cmd/podman/generate/kube.go
+++ b/cmd/podman/generate/kube.go
@@ -11,7 +11,6 @@ import (
"github.com/containers/podman/v4/cmd/podman/registry"
"github.com/containers/podman/v4/cmd/podman/utils"
"github.com/containers/podman/v4/pkg/domain/entities"
- "github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -68,10 +67,10 @@ func kube(cmd *cobra.Command, args []string) error {
if cmd.Flags().Changed("filename") {
if _, err := os.Stat(kubeFile); err == nil {
- return errors.Errorf("cannot write to %q; file exists", kubeFile)
+ return fmt.Errorf("cannot write to %q; file exists", kubeFile)
}
if err := ioutil.WriteFile(kubeFile, content, 0644); err != nil {
- return errors.Wrapf(err, "cannot write to %q", kubeFile)
+ return fmt.Errorf("cannot write to %q: %w", kubeFile, err)
}
return nil
}