mirror of https://github.com/containers/podman.git
Merge pull request #9676 from giuseppe/cli-overrides-conf
options: append CLI graph driver options
This commit is contained in:
commit
1ac2fb7817
|
|
@ -64,15 +64,22 @@ func WithStorageConfig(config storage.StoreOptions) RuntimeOption {
|
||||||
setField = true
|
setField = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
graphDriverChanged := false
|
||||||
if config.GraphDriverName != "" {
|
if config.GraphDriverName != "" {
|
||||||
rt.storageConfig.GraphDriverName = config.GraphDriverName
|
rt.storageConfig.GraphDriverName = config.GraphDriverName
|
||||||
rt.storageSet.GraphDriverNameSet = true
|
rt.storageSet.GraphDriverNameSet = true
|
||||||
setField = true
|
setField = true
|
||||||
|
graphDriverChanged = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.GraphDriverOptions != nil {
|
if config.GraphDriverOptions != nil {
|
||||||
rt.storageConfig.GraphDriverOptions = make([]string, len(config.GraphDriverOptions))
|
if graphDriverChanged {
|
||||||
copy(rt.storageConfig.GraphDriverOptions, config.GraphDriverOptions)
|
rt.storageConfig.GraphDriverOptions = make([]string, len(config.GraphDriverOptions))
|
||||||
|
copy(rt.storageConfig.GraphDriverOptions, config.GraphDriverOptions)
|
||||||
|
} else {
|
||||||
|
// append new options after what is specified in the config files
|
||||||
|
rt.storageConfig.GraphDriverOptions = append(rt.storageConfig.GraphDriverOptions, config.GraphDriverOptions...)
|
||||||
|
}
|
||||||
setField = true
|
setField = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue