Add ShellEscapeListIncludingSpaces

This simplifies escaping for aquery.

Test: build/bazel/ci/mixed_droid.sh
Change-Id: I88356a8eda0c6a6ac9426d37cd386f0a94b8818b
This commit is contained in:
Liz Kammer 2021-11-16 17:17:02 -05:00
parent 6fbc68d41d
commit 3a988df18a

View file

@ -53,7 +53,15 @@ func ShellEscapeList(slice []string) []string {
slice[i] = ShellEscape(s) slice[i] = ShellEscape(s)
} }
return slice return slice
}
func ShellEscapeListIncludingSpaces(slice []string) []string {
slice = append([]string(nil), slice...)
for i, s := range slice {
slice[i] = ShellEscapeIncludingSpaces(s)
}
return slice
} }
func shellUnsafeChar(r rune) bool { func shellUnsafeChar(r rune) bool {