summaryrefslogtreecommitdiff
path: root/cmd/podman/images
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-01 19:26:54 +0200
committerGitHub <noreply@github.com>2020-05-01 19:26:54 +0200
commita451048efc67d404d4af934757179819106d9d22 (patch)
tree5afe1843e74c33a4a2ac3b069a133e6b4288d616 /cmd/podman/images
parent226e0da6fe12bf8a023f67ce6cebacd54ec65fdc (diff)
parentef603de8ecf27ace01c5cfdc92f878948a33f1f6 (diff)
downloadpodman-a451048efc67d404d4af934757179819106d9d22.tar.gz
podman-a451048efc67d404d4af934757179819106d9d22.tar.bz2
podman-a451048efc67d404d4af934757179819106d9d22.zip
Merge pull request #6059 from QiWang19/search-limit
search --limit compatible with docker
Diffstat (limited to 'cmd/podman/images')
-rw-r--r--cmd/podman/images/search.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/images/search.go b/cmd/podman/images/search.go
index a8abfb339..a259b2419 100644
--- a/cmd/podman/images/search.go
+++ b/cmd/podman/images/search.go
@@ -105,6 +105,10 @@ func imageSearch(cmd *cobra.Command, args []string) error {
return errors.Errorf("search requires exactly one argument")
}
+ if searchOptions.Limit > 100 {
+ return errors.Errorf("Limit %d is outside the range of [1, 100]", searchOptions.Limit)
+ }
+
// TLS verification in c/image is controlled via a `types.OptionalBool`
// which allows for distinguishing among set-true, set-false, unspecified
// which is important to implement a sane way of dealing with defaults of