mirror of
https://github.com/containers/podman.git
synced 2025-07-01 08:07:03 +08:00
Merge pull request #22640 from WxNzEMof/runtimes-without-paths
Don't panic if a runtime was configured without paths
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user