The parameter parsing code at
|
// SplitParameters splits shell command parameters, taking quoting in account. |
|
func SplitParameters(s string) []string { |
|
r := regexp.MustCompile(`'[^']*'|[^ ]+`) |
|
return r.FindAllString(s, -1) |
|
} |
allows extracting quoted arguments (to allow such things as
-tags 'foo bar'), but it does not remove the quotes around quoted arguments before passing this to the execution layer. Thus, quoted arguments aren't currently working correctly.
I wonder overall whether we should try to parse this as one line or go the "normal" way of just having a YAML list of command-line arguments with no postprocessing needed after YAML parsing.