mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Refactor the engine.Interface such that the Set() API does not return an extraneous error
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
This commit is contained in:
@@ -308,9 +308,11 @@ func enableCDI(config *config, cfg engine.Interface) error {
|
||||
}
|
||||
switch config.runtime {
|
||||
case "containerd":
|
||||
return cfg.Set("enable_cdi", true)
|
||||
cfg.Set("enable_cdi", true)
|
||||
case "docker":
|
||||
return cfg.Set("experimental", true)
|
||||
cfg.Set("experimental", true)
|
||||
default:
|
||||
return fmt.Errorf("enabling CDI in %s is not supported", config.runtime)
|
||||
}
|
||||
return fmt.Errorf("enabling CDI in %s is not supported", config.runtime)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user