Commit 7032b6af
7032b6af7c2dMerged
Vigilans <[email protected]> ยท 11 months ago ยท 1 file ยท ~1 modified
Description
fix: use shlex.Split to process lifecycle command string
Signed-off-by: Vigilans [email protected]
Details
- Commit
- 7032b6af7c2d
- Parent
- b5d1d9e9e583
pkg/hooks/yaml.gomodifiedView file
@@ -1,8 +1,7 @@
11
package hooks22
33
import (4-
"strings"5-
4+
"github.com/google/shlex"65
"github.com/helmwave/helmwave/pkg/helper"76
"gopkg.in/yaml.v3"87
)@@ -37,7 +36,11 @@
3736
}3837
3938
// Short name40-
words := strings.Fields(script)39+
words, err := shlex.Split(script)40+
if err != nil {41+
return NewYAMLDecodeError(err)42+
}43+
4144
if len(words) > 1 {4245
h.Cmd = words[0]4346
h.Args = words[1:]