summaryrefslogtreecommitdiff
path: root/cmd/podman/registry/registry.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/registry/registry.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/registry/registry.go')
-rw-r--r--cmd/podman/registry/registry.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/registry/registry.go b/cmd/podman/registry/registry.go
index 1c5e5d21b..2e9d59d10 100644
--- a/cmd/podman/registry/registry.go
+++ b/cmd/podman/registry/registry.go
@@ -49,8 +49,8 @@ func ImageEngine() entities.ImageEngine {
// NewImageEngine is a wrapper for building an ImageEngine to be used for PreRunE functions
func NewImageEngine(cmd *cobra.Command, args []string) (entities.ImageEngine, error) {
if imageEngine == nil {
- PodmanOptions.FlagSet = cmd.Flags()
- engine, err := infra.NewImageEngine(PodmanOptions)
+ podmanOptions.FlagSet = cmd.Flags()
+ engine, err := infra.NewImageEngine(&podmanOptions)
if err != nil {
return nil, err
}
@@ -66,8 +66,8 @@ func ContainerEngine() entities.ContainerEngine {
// NewContainerEngine is a wrapper for building an ContainerEngine to be used for PreRunE functions
func NewContainerEngine(cmd *cobra.Command, args []string) (entities.ContainerEngine, error) {
if containerEngine == nil {
- PodmanOptions.FlagSet = cmd.Flags()
- engine, err := infra.NewContainerEngine(PodmanOptions)
+ podmanOptions.FlagSet = cmd.Flags()
+ engine, err := infra.NewContainerEngine(&podmanOptions)
if err != nil {
return nil, err
}
@@ -101,7 +101,7 @@ func Context() context.Context {
}
func ContextWithOptions(ctx context.Context) context.Context {
- cliCtx = context.WithValue(ctx, PodmanOptionsKey{}, PodmanOptions)
+ cliCtx = context.WithValue(ctx, PodmanOptionsKey{}, podmanOptions)
return cliCtx
}