Added quotes to protect wildcard

When generating zip archive with zip2zip wildcard mask is specified.
Bash attempts to resolve wildcard **/*.class. If android build
top directory containts subfolder(s) with .class, bash wildcard
resolution  succeeds. Bash passes list of files to zip2zip instead
of actual wildcard. Created archive doesn't contain required files.

Adding quotes to wildcard to prvent that.

Bug: NA
Test: manual - build with coverage enabled
Change-Id: Iebdaa32693fe820f0f79588d61cb89660ea2b611
This commit is contained in:
Maxim Pleshivenkov 2021-06-30 10:31:46 -04:00
parent e19e6196b9
commit 9d773841c9
2 changed files with 2 additions and 2 deletions

View file

@ -94,7 +94,7 @@ func jacocoFiltersToZipCommand(includes, excludes []string) string {
if len(includes) > 0 {
specs += strings.Join(includes, " ")
} else {
specs += "**/*.class"
specs += "'**/*.class'"
}
return specs
}

View file

@ -74,7 +74,7 @@ func TestJacocoFiltersToZipCommand(t *testing.T) {
{
name: "implicit wildcard",
includes: []string{},
out: "**/*.class",
out: "'**/*.class'",
},
{
name: "only include",