mirror of
https://github.com/containers/podman.git
synced 2025-10-15 10:16:28 +08:00
container.conf: support attributed string slices
All `[]string`s in containers.conf have now been migrated to attributed string slices which require some adjustments in Buildah and Podman. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -185,7 +185,7 @@ func WithConmonPath(path string) RuntimeOption {
|
||||
return fmt.Errorf("must provide a valid path: %w", define.ErrInvalidArg)
|
||||
}
|
||||
|
||||
rt.config.Engine.ConmonPath = []string{path}
|
||||
rt.config.Engine.ConmonPath.Set([]string{path})
|
||||
|
||||
return nil
|
||||
}
|
||||
@ -198,8 +198,7 @@ func WithConmonEnv(environment []string) RuntimeOption {
|
||||
return define.ErrRuntimeFinalized
|
||||
}
|
||||
|
||||
rt.config.Engine.ConmonEnvVars = make([]string, len(environment))
|
||||
copy(rt.config.Engine.ConmonEnvVars, environment)
|
||||
rt.config.Engine.ConmonEnvVars.Set(environment)
|
||||
|
||||
return nil
|
||||
}
|
||||
@ -308,7 +307,7 @@ func WithHooksDir(hooksDirs ...string) RuntimeOption {
|
||||
}
|
||||
}
|
||||
|
||||
rt.config.Engine.HooksDir = hooksDirs
|
||||
rt.config.Engine.HooksDir.Set(hooksDirs)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@ -410,7 +409,7 @@ func WithCNIPluginDir(dir string) RuntimeOption {
|
||||
return define.ErrRuntimeFinalized
|
||||
}
|
||||
|
||||
rt.config.Network.CNIPluginDirs = []string{dir}
|
||||
rt.config.Network.CNIPluginDirs.Set([]string{dir})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user