summaryrefslogtreecommitdiff
path: root/cmd/podman/images/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/images/search.go')
-rw-r--r--cmd/podman/images/search.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/images/search.go b/cmd/podman/images/search.go
index a18f7a11d..eb876d3d4 100644
--- a/cmd/podman/images/search.go
+++ b/cmd/podman/images/search.go
@@ -1,6 +1,7 @@
package images
import (
+ "errors"
"fmt"
"os"
"strings"
@@ -12,7 +13,6 @@ import (
"github.com/containers/podman/v4/cmd/podman/common"
"github.com/containers/podman/v4/cmd/podman/registry"
"github.com/containers/podman/v4/pkg/domain/entities"
- "github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -111,11 +111,11 @@ func imageSearch(cmd *cobra.Command, args []string) error {
case 1:
searchTerm = args[0]
default:
- return errors.Errorf("search requires exactly one argument")
+ return errors.New("search requires exactly one argument")
}
if searchOptions.ListTags && len(searchOptions.Filters) != 0 {
- return errors.Errorf("filters are not applicable to list tags result")
+ return errors.New("filters are not applicable to list tags result")
}
// TLS verification in c/image is controlled via a `types.OptionalBool`
@@ -155,7 +155,7 @@ func imageSearch(cmd *cobra.Command, args []string) error {
switch {
case searchOptions.ListTags:
if len(searchOptions.Filters) != 0 {
- return errors.Errorf("filters are not applicable to list tags result")
+ return errors.New("filters are not applicable to list tags result")
}
if isJSON {
listTagsEntries := buildListTagsJSON(searchReport)
@@ -181,7 +181,7 @@ func imageSearch(cmd *cobra.Command, args []string) error {
if rpt.RenderHeaders {
hdrs := report.Headers(entities.ImageSearchReport{}, nil)
if err := rpt.Execute(hdrs); err != nil {
- return errors.Wrapf(err, "failed to write report column headers")
+ return fmt.Errorf("failed to write report column headers: %w", err)
}
}
return rpt.Execute(searchReport)