From 51a5cdc6366905cde09e8efb7afa06f51ef9c67b Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Thu, 26 Apr 2018 16:41:06 -0400 Subject: Modify secrets pkg Made a mistake in my earlier patch. I though that if you add an empty string to an array, the length of the array would still be 0... Realised this when vendoring the secrets pkg into cri-o. Signed-off-by: umohnani8 Closes: #685 Approved by: mheon --- libpod/options.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libpod/options.go') diff --git a/libpod/options.go b/libpod/options.go index 202cfe9a3..981ca9a9d 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -194,7 +194,10 @@ func WithDefaultMountsFile(mountsFile string) RuntimeOption { return ErrRuntimeFinalized } - rt.config.DefaultMountsFile = []string{mountsFile} + if mountsFile == "" { + return ErrInvalidArg + } + rt.config.DefaultMountsFile = mountsFile return nil } } -- cgit v1.2.3-54-g00ecf