From 3c1c55c8ceb266f2005daf8b4915ab49a898a51f Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Tue, 18 Aug 2020 08:57:00 -0700 Subject: 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 --- cmd/podman/registry/remote.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmd') 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 -- cgit v1.2.3-54-g00ecf