summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-05-17 11:32:30 +0200
committerValentin Rothberg <rothberg@redhat.com>2019-05-17 11:32:30 +0200
commit8f7f86d8cdadd90670b5dbbdfedb2550b0a4025a (patch)
tree31eacb1aa2140683e5fffb7773d5094fcc3a964c /cmd/podman
parentee1383a7b9a1fc7bda96b47fb9a1f38dc5e36d24 (diff)
downloadpodman-8f7f86d8cdadd90670b5dbbdfedb2550b0a4025a.tar.gz
podman-8f7f86d8cdadd90670b5dbbdfedb2550b0a4025a.tar.bz2
podman-8f7f86d8cdadd90670b5dbbdfedb2550b0a4025a.zip
remote: version: fix nil dereference
Fix a nil dereference by passing the PodmanCommand to GetRuntime(). Fixes: #3145 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/version.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/version.go b/cmd/podman/version.go
index 439a1cca6..52a518db8 100644
--- a/cmd/podman/version.go
+++ b/cmd/podman/version.go
@@ -70,7 +70,7 @@ func versionCmd(c *cliconfig.VersionValues) error {
if remote {
fmt.Fprintf(w, "\nService:\n")
- runtime, err := adapter.GetRuntime(getContext(), nil)
+ runtime, err := adapter.GetRuntime(getContext(), &c.PodmanCommand)
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}