diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-02 01:22:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-02 01:22:44 +0200 |
commit | e48dc506d18335b36d1ffbbc8df1890ee3b99e2c (patch) | |
tree | 9bfeffca310068bc8ed23024756dcd6540239ea6 /libpod/image/search.go | |
parent | 1bbcb2fc56c1655269930c83628ef5f5802f1887 (diff) | |
parent | 619a39f7bb2275a086651fcf31619959f6d15c6b (diff) | |
download | podman-e48dc506d18335b36d1ffbbc8df1890ee3b99e2c.tar.gz podman-e48dc506d18335b36d1ffbbc8df1890ee3b99e2c.tar.bz2 podman-e48dc506d18335b36d1ffbbc8df1890ee3b99e2c.zip |
Merge pull request #3693 from QiWang19/search
fix search output limit
Diffstat (limited to 'libpod/image/search.go')
-rw-r--r-- | libpod/image/search.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libpod/image/search.go b/libpod/image/search.go index e557431c6..82ef4f75a 100644 --- a/libpod/image/search.go +++ b/libpod/image/search.go @@ -162,8 +162,11 @@ func searchImageInRegistry(term string, registry string, options SearchOptions) if len(results) < limit { limit = len(results) } - if options.Limit != 0 && options.Limit < len(results) { - limit = options.Limit + if options.Limit != 0 { + limit = len(results) + if options.Limit < len(results) { + limit = options.Limit + } } paramsArr := []SearchResult{} |