diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-08-18 08:57:00 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2020-08-18 08:57:00 -0700 |
commit | 3c1c55c8ceb266f2005daf8b4915ab49a898a51f (patch) | |
tree | ac13159b2f9d2ed7ca7311989cbb4841c1c161f1 /cmd/podman | |
parent | 748e8829da76394ec956ea6590599fab01b467b7 (diff) | |
download | podman-3c1c55c8ceb266f2005daf8b4915ab49a898a51f.tar.gz podman-3c1c55c8ceb266f2005daf8b4915ab49a898a51f.tar.bz2 podman-3c1c55c8ceb266f2005daf8b4915ab49a898a51f.zip |
Remove help/usage from --remote pre-check
--remote pre-check was providing usage context, which was also being
provided by the root podman command.
Fixes #7273
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/registry/remote.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/registry/remote.go b/cmd/podman/registry/remote.go index 9b7523ac0..78b820269 100644 --- a/cmd/podman/registry/remote.go +++ b/cmd/podman/registry/remote.go @@ -15,13 +15,14 @@ var remoteFromCLI = struct { }{} // IsRemote returns true if podman was built to run remote or --remote flag given on CLI -// Use in init() functions as a initialization check +// Use in init() functions as an initialization check func IsRemote() bool { remoteFromCLI.sync.Do(func() { fs := pflag.NewFlagSet("remote", pflag.ContinueOnError) - fs.BoolVarP(&remoteFromCLI.Value, "remote", "r", false, "") fs.ParseErrorsWhitelist.UnknownFlags = true + fs.Usage = func() {} fs.SetInterspersed(false) + fs.BoolVarP(&remoteFromCLI.Value, "remote", "r", false, "") _ = fs.Parse(os.Args[1:]) }) return podmanOptions.EngineMode == entities.TunnelMode || remoteFromCLI.Value |