mirror of https://github.com/containers/podman.git
Don't panic if a runtime was configured without paths
Signed-off-by: WxNzEMof <143541718+WxNzEMof@users.noreply.github.com>
This commit is contained in:
parent
ee8ed8dd1f
commit
7bfac4f349
|
@ -192,6 +192,9 @@ func getSecOpts(sysInfo *sysinfo.SysInfo) []string {
|
||||||
func getRuntimes(configInfo *config.Config) map[string]dockerSystem.RuntimeWithStatus {
|
func getRuntimes(configInfo *config.Config) map[string]dockerSystem.RuntimeWithStatus {
|
||||||
runtimes := map[string]dockerSystem.RuntimeWithStatus{}
|
runtimes := map[string]dockerSystem.RuntimeWithStatus{}
|
||||||
for name, paths := range configInfo.Engine.OCIRuntimes {
|
for name, paths := range configInfo.Engine.OCIRuntimes {
|
||||||
|
if len(paths) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
runtime := dockerSystem.RuntimeWithStatus{}
|
runtime := dockerSystem.RuntimeWithStatus{}
|
||||||
runtime.Runtime = dockerSystem.Runtime{Path: paths[0], Args: nil}
|
runtime.Runtime = dockerSystem.Runtime{Path: paths[0], Args: nil}
|
||||||
runtimes[name] = runtime
|
runtimes[name] = runtime
|
||||||
|
|
Loading…
Reference in New Issue