From b2e82f3bf0529674136a17ab3d82a91f9ac33f2c Mon Sep 17 00:00:00 2001 From: Sergey Lanzman Date: Sun, 21 Jan 2024 08:48:36 +0200 Subject: [PATCH] fix(action): Add validation for Kustomize Build Options white space (#16704) Signed-off-by: Sergey Lanzman --- util/kustomize/kustomize.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/kustomize/kustomize.go b/util/kustomize/kustomize.go index 2487b14b4903b3..f3d2246899d12a 100644 --- a/util/kustomize/kustomize.go +++ b/util/kustomize/kustomize.go @@ -315,7 +315,7 @@ func (k *kustomize) Build(opts *v1alpha1.ApplicationSourceKustomize, kustomizeOp } func parseKustomizeBuildOptions(path, buildOptions string) []string { - return append([]string{"build", path}, strings.Split(buildOptions, " ")...) + return append([]string{"build", path}, strings.Fields(buildOptions)...) } var KustomizationNames = []string{"kustomization.yaml", "kustomization.yml", "Kustomization"}