From a50400a320470379f7e2a2dde0e7d639eb37914a Mon Sep 17 00:00:00 2001 From: Tobias Bauriedel Date: Fri, 15 Nov 2024 18:06:42 +0100 Subject: [PATCH] Respect whitespaces in wizard StringSliceVar (#140) --- internal/config/wizard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/wizard.go b/internal/config/wizard.go index 8f4ba04..b98babc 100644 --- a/internal/config/wizard.go +++ b/internal/config/wizard.go @@ -105,7 +105,7 @@ func (w *Wizard) AddStringSliceVar(callback *[]string, name string, defaultValue var input string w.newStringPromptWithDefault(&input, strings.Join(defaultValue, ","), usage, required) - *callback = strings.Split(input, ",") + *callback = strings.Split(strings.ReplaceAll(input, " ", ""), ",") }, dependency: dependency, })