diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-04-29 15:20:05 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-04-29 16:28:12 +0200 |
commit | 2d10471b8da734c57867858e6e8340081ffd921c (patch) | |
tree | 69176140e7640c5702b925c63f986f6e3482d818 /cmd/podman/images/search.go | |
parent | a76a99352a2145e1dd6b70db56d9cfa550633fbd (diff) | |
download | podman-2d10471b8da734c57867858e6e8340081ffd921c.tar.gz podman-2d10471b8da734c57867858e6e8340081ffd921c.tar.bz2 podman-2d10471b8da734c57867858e6e8340081ffd921c.zip |
pull/search options: tls verify -> skip
Change the logic in the options from tls-verify to skipping
verification. It require a constant brain yoga to translate
from doing verification (CLI logic) to skipping it (c/image logic).
As the code is using c/image, let's make it consistent.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'cmd/podman/images/search.go')
-rw-r--r-- | cmd/podman/images/search.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/podman/images/search.go b/cmd/podman/images/search.go index fdad94d45..df4d83554 100644 --- a/cmd/podman/images/search.go +++ b/cmd/podman/images/search.go @@ -103,16 +103,15 @@ func imageSearch(cmd *cobra.Command, args []string) error { return errors.Errorf("search requires exactly one argument") } - sarchOptsAPI := searchOptions.ImageSearchOptions // 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 // boolean CLI flags. if cmd.Flags().Changed("tls-verify") { - sarchOptsAPI.TLSVerify = types.NewOptionalBool(pullOptions.TLSVerifyCLI) + searchOptions.SkipTLSVerify = types.NewOptionalBool(!pullOptions.TLSVerifyCLI) } - searchReport, err := registry.ImageEngine().Search(registry.GetContext(), searchTerm, sarchOptsAPI) + searchReport, err := registry.ImageEngine().Search(registry.GetContext(), searchTerm, searchOptions.ImageSearchOptions) if err != nil { return err } |