summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-18 20:37:40 +0200
committerGitHub <noreply@github.com>2020-08-18 20:37:40 +0200
commitc1fef2af3ec84b2d9cb27bf3cad9f8414552a3a9 (patch)
treeac13159b2f9d2ed7ca7311989cbb4841c1c161f1
parent748e8829da76394ec956ea6590599fab01b467b7 (diff)
parent3c1c55c8ceb266f2005daf8b4915ab49a898a51f (diff)
downloadpodman-c1fef2af3ec84b2d9cb27bf3cad9f8414552a3a9.tar.gz
podman-c1fef2af3ec84b2d9cb27bf3cad9f8414552a3a9.tar.bz2
podman-c1fef2af3ec84b2d9cb27bf3cad9f8414552a3a9.zip
Merge pull request #7358 from jwhonce/issues/7273
Remove help/usage from --remote pre-check
-rw-r--r--cmd/podman/registry/remote.go5
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