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>
This commit is contained in:
Valentin Rothberg 2019-05-17 11:32:30 +02:00
parent ee1383a7b9
commit 8f7f86d8cd
1 changed files with 1 additions and 1 deletions

View File

@ -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")
}