Merge pull request #22640 from WxNzEMof/runtimes-without-paths

Don't panic if a runtime was configured without paths
This commit is contained in:
openshift-merge-bot[bot]
2024-05-13 20:33:27 +00:00
committed by GitHub

View File

@ -192,6 +192,9 @@ func getSecOpts(sysInfo *sysinfo.SysInfo) []string {
func getRuntimes(configInfo *config.Config) map[string]dockerSystem.RuntimeWithStatus {
runtimes := map[string]dockerSystem.RuntimeWithStatus{}
for name, paths := range configInfo.Engine.OCIRuntimes {
if len(paths) == 0 {
continue
}
runtime := dockerSystem.RuntimeWithStatus{}
runtime.Runtime = dockerSystem.Runtime{Path: paths[0], Args: nil}
runtimes[name] = runtime