Skip to content

Commit

Permalink
Merge pull request #7358 from jwhonce/issues/7273
Browse files Browse the repository at this point in the history
Remove help/usage from --remote pre-check
  • Loading branch information
openshift-merge-robot authored Aug 18, 2020
2 parents 748e882 + 3c1c55c commit c1fef2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/podman/registry/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c1fef2a

Please sign in to comment.