summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/play.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index e72584207..155b06105 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -354,9 +354,15 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
containers := make([]*libpod.Container, 0, len(podYAML.Spec.Containers))
initContainers := make([]*libpod.Container, 0, len(podYAML.Spec.InitContainers))
- cwd, err := os.Getwd()
- if err != nil {
- return nil, err
+
+ var cwd string
+ if options.ContextDir != "" {
+ cwd = options.ContextDir
+ } else {
+ cwd, err = os.Getwd()
+ if err != nil {
+ return nil, err
+ }
}
ctrNames := make(map[string]string)