Record when volume path is explicitly set in config

This ensures we won't overwrite it when it's set in the config we
load from disk.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon 2019-02-25 15:37:20 -05:00
parent 5a0a9dfa23
commit ba6f1acf07

View file

@ -405,6 +405,9 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) {
if tmpConfig.TmpDir != "" {
runtime.configuredFrom.libpodTmpDirSet = true
}
if tmpConfig.VolumePath != "" {
runtime.configuredFrom.volPathSet = true
}
if _, err := toml.Decode(string(contents), runtime.config); err != nil {
return nil, errors.Wrapf(err, "error decoding configuration file %s", configPath)