summaryrefslogtreecommitdiff
path: root/cmd/podmanV2/registry
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podmanV2/registry')
-rw-r--r--cmd/podmanV2/registry/registry.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podmanV2/registry/registry.go b/cmd/podmanV2/registry/registry.go
index 9c12b2456..f0650a7cf 100644
--- a/cmd/podmanV2/registry/registry.go
+++ b/cmd/podmanV2/registry/registry.go
@@ -21,6 +21,7 @@ var (
imageEngine entities.ImageEngine
containerEngine entities.ContainerEngine
+ cliCtx context.Context
EngineOptions entities.EngineOptions
@@ -125,3 +126,10 @@ func Options(cmd *cobra.Command) (*entities.EngineOptions, error) {
}
return nil, nil
}
+
+func GetContext() context.Context {
+ if cliCtx == nil {
+ cliCtx = context.TODO()
+ }
+ return cliCtx
+}