aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-04-16 16:42:33 -0700
committerJhon Honce <jhonce@redhat.com>2020-04-16 16:49:59 -0700
commit554c663b5ad2bd0c0fa4c58559ec2a9b19ed399f (patch)
tree215280684ce6195fac64f18ebd7d29c5baa376cc /cmd/podman/main.go
parent0d2b5532c417c58bd24e71a56c5c55b43e423a59 (diff)
downloadpodman-554c663b5ad2bd0c0fa4c58559ec2a9b19ed399f.tar.gz
podman-554c663b5ad2bd0c0fa4c58559ec2a9b19ed399f.tar.bz2
podman-554c663b5ad2bd0c0fa4c58559ec2a9b19ed399f.zip
Fix bug where two configurations had been created
* registry.PodmanConfig() new returns a pointer to the source of truth Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r--cmd/podman/main.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 5f7bfe3c9..2d9e45177 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -14,12 +14,6 @@ import (
"github.com/containers/storage/pkg/reexec"
)
-func init() {
- // This is the bootstrap configuration, if user gives
- // CLI flags parts of this configuration may be overwritten
- registry.PodmanOptions = registry.NewPodmanConfig()
-}
-
func main() {
if reexec.Init() {
// We were invoked with a different argv[0] indicating that we
@@ -27,9 +21,10 @@ func main() {
return
}
+ cfg := registry.PodmanConfig()
for _, c := range registry.Commands {
for _, m := range c.Mode {
- if registry.PodmanOptions.EngineMode == m {
+ if cfg.EngineMode == m {
parent := rootCmd
if c.Parent != nil {
parent = c.Parent