Skip to content

Commit

Permalink
Don't panic if a runtime was configured without paths
Browse files Browse the repository at this point in the history
Signed-off-by: WxNzEMof <[email protected]>
  • Loading branch information
WxNzEMof committed May 8, 2024
1 parent ee8ed8d commit 7bfac4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/api/handlers/compat/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7bfac4f

Please sign in to comment.