Skip to content

Commit 7b47eee

Browse files
author
Evan Lezar
committed
Merge branch 'CNT-4774/implement-set-for-crio' into 'main'
Implement Set() for the crio implementation of engine.Interface See merge request nvidia/container-toolkit/container-toolkit!517
2 parents 527248e + d7a3d93 commit 7b47eee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/config/engine/crio/crio.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,12 @@ func (c *Config) RemoveRuntime(name string) error {
101101
return nil
102102
}
103103

104-
// Set is not supported for cri-o configs.
105-
func (c *Config) Set(key string, value interface{}) {}
104+
// Set sets the specified cri-o option.
105+
func (c *Config) Set(key string, value interface{}) {
106+
config := (toml.Tree)(*c)
107+
config.Set(key, value)
108+
*c = (Config)(config)
109+
}
106110

107111
// Save writes the config to the specified path
108112
func (c Config) Save(path string) (int64, error) {

0 commit comments

Comments
 (0)