mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Also cleanup v1 default_runtime if BinaryName is set
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
15cbd54d1c
commit
dad3e855b5
@ -84,6 +84,14 @@ func (config *configV1) Revert(o *options) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if runtime, ok := config.GetPath(append(defaultRuntimeOptionsPath, "BinaryName")).(string); ok {
|
||||||
|
for _, runtimeBinary := range o.getRuntimeBinaries() {
|
||||||
|
if path.Base(runtimeBinary) == path.Base(runtime) {
|
||||||
|
config.DeletePath(append(defaultRuntimeOptionsPath, "BinaryName"))
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if options, ok := config.GetPath(defaultRuntimeOptionsPath).(*toml.Tree); ok {
|
if options, ok := config.GetPath(defaultRuntimeOptionsPath).(*toml.Tree); ok {
|
||||||
if len(options.Keys()) == 0 {
|
if len(options.Keys()) == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user