aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-31 16:45:35 -0400
committerMatthew Heon <mheon@redhat.com>2021-04-16 13:11:25 -0400
commitb3ef9e4dd8f91326b1f5e85360679ec5ffd213f9 (patch)
tree3baa61ca6aed26b212744648ecfcfdcd800f8352 /libpod
parent19a4df75fd2dc7a914116484223d71f8b6a25192 (diff)
downloadpodman-b3ef9e4dd8f91326b1f5e85360679ec5ffd213f9.tar.gz
podman-b3ef9e4dd8f91326b1f5e85360679ec5ffd213f9.tar.bz2
podman-b3ef9e4dd8f91326b1f5e85360679ec5ffd213f9.zip
Allow users to override default storage opts with --storage-opt
We define in the man page that this overrides the default storage options, but the code was appending to the existing options. This PR also makes a change to allow users to specify --storage-opt="". This will turn off all storage options. https://github.com/containers/podman/issues/9852 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/options.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 24e9d74f4..333a7c4a5 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -77,8 +77,7 @@ func WithStorageConfig(config storage.StoreOptions) RuntimeOption {
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...)
+ rt.storageConfig.GraphDriverOptions = config.GraphDriverOptions
}
setField = true
}