mirror of
https://github.com/containers/podman.git
synced 2025-12-06 21:57:50 +08:00
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:
@@ -70,7 +70,7 @@ func versionCmd(c *cliconfig.VersionValues) error {
|
|||||||
if remote {
|
if remote {
|
||||||
fmt.Fprintf(w, "\nService:\n")
|
fmt.Fprintf(w, "\nService:\n")
|
||||||
|
|
||||||
runtime, err := adapter.GetRuntime(getContext(), nil)
|
runtime, err := adapter.GetRuntime(getContext(), &c.PodmanCommand)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "could not get runtime")
|
return errors.Wrapf(err, "could not get runtime")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user