mirror of
https://github.com/containers/podman.git
synced 2025-07-04 18:27:33 +08:00
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:
@ -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