summaryrefslogtreecommitdiff
path: root/cmd/podman/manifest
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-06-30 09:58:52 -0400
committerGitHub <noreply@github.com>2022-06-30 09:58:52 -0400
commit3e8ab312395b32d0b43f1ac82adf53439b012893 (patch)
treeb8024f94b0f7446f6779c5d6e83bc6697c010387 /cmd/podman/manifest
parentaa109ae0f058060466b61d01571e37b7cc718b9a (diff)
parente8adec5f41388916b0f2206dc898a5587d51467c (diff)
downloadpodman-3e8ab312395b32d0b43f1ac82adf53439b012893.tar.gz
podman-3e8ab312395b32d0b43f1ac82adf53439b012893.tar.bz2
podman-3e8ab312395b32d0b43f1ac82adf53439b012893.zip
Merge pull request #14785 from saschagrunert/cmd-podman-errors
cmd/podman: switch to golang native error wrapping
Diffstat (limited to 'cmd/podman/manifest')
-rw-r--r--cmd/podman/manifest/push.go6
-rw-r--r--cmd/podman/manifest/remove.go3
2 files changed, 4 insertions, 5 deletions
diff --git a/cmd/podman/manifest/push.go b/cmd/podman/manifest/push.go
index b96a65c4a..9479e79a3 100644
--- a/cmd/podman/manifest/push.go
+++ b/cmd/podman/manifest/push.go
@@ -1,6 +1,7 @@
package manifest
import (
+ "fmt"
"io/ioutil"
"github.com/containers/common/pkg/auth"
@@ -11,7 +12,6 @@ import (
"github.com/containers/podman/v4/cmd/podman/utils"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/util"
- "github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -88,10 +88,10 @@ func push(cmd *cobra.Command, args []string) error {
listImageSpec := args[0]
destSpec := args[1]
if listImageSpec == "" {
- return errors.Errorf(`invalid image name "%s"`, listImageSpec)
+ return fmt.Errorf(`invalid image name "%s"`, listImageSpec)
}
if destSpec == "" {
- return errors.Errorf(`invalid destination "%s"`, destSpec)
+ return fmt.Errorf(`invalid destination "%s"`, destSpec)
}
if manifestPushOpts.CredentialsCLI != "" {
diff --git a/cmd/podman/manifest/remove.go b/cmd/podman/manifest/remove.go
index c32ffad78..4aa3b66b7 100644
--- a/cmd/podman/manifest/remove.go
+++ b/cmd/podman/manifest/remove.go
@@ -5,7 +5,6 @@ import (
"github.com/containers/podman/v4/cmd/podman/common"
"github.com/containers/podman/v4/cmd/podman/registry"
- "github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -31,7 +30,7 @@ func init() {
func remove(cmd *cobra.Command, args []string) error {
updatedListID, err := registry.ImageEngine().ManifestRemoveDigest(registry.Context(), args[0], args[1])
if err != nil {
- return errors.Wrapf(err, "error removing from manifest list %s", args[0])
+ return fmt.Errorf("removing from manifest list %s: %w", args[0], err)
}
fmt.Println(updatedListID)
return nil