summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-08 11:12:25 -0800
committerGitHub <noreply@github.com>2019-03-08 11:12:25 -0800
commitb3d9540b1621954b63a2db8e53a38b572aadb067 (patch)
treed0a985134dba87da6d9b0d229e399844a3e39a5f /cmd
parentbf8c2096d8bba5d94a6e6201ba483f2aa72f1d01 (diff)
parent24f567a3db68efe67273b63cd50a003f0b6c5621 (diff)
downloadpodman-b3d9540b1621954b63a2db8e53a38b572aadb067.tar.gz
podman-b3d9540b1621954b63a2db8e53a38b572aadb067.tar.bz2
podman-b3d9540b1621954b63a2db8e53a38b572aadb067.zip
Merge pull request #2589 from baude/issue2171
container runlabel respect $PWD
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/shared/container.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go
index 81811e0f2..e191e8069 100644
--- a/cmd/podman/shared/container.go
+++ b/cmd/podman/shared/container.go
@@ -665,6 +665,14 @@ func GenerateRunlabelCommand(runLabel, imageName, name string, opts map[string]s
return envmap["OPT2"]
case "OPT3":
return envmap["OPT3"]
+ case "PWD":
+ // I would prefer to use os.getenv but it appears PWD is not in the os env list
+ d, err := os.Getwd()
+ if err != nil {
+ logrus.Error("unable to determine current working directory")
+ return ""
+ }
+ return d
}
return ""
}