Merge "individually escape results of $(locations)" into main
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 6b11019..4db4e86 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -539,7 +539,7 @@
 						if len(paths) == 0 {
 							return reportError("label %q has no files", label)
 						}
-						return proptools.ShellEscape(strings.Join(paths, " ")), nil
+						return strings.Join(proptools.ShellEscapeList(paths), " "), nil
 					} else {
 						return reportError("unknown locations label %q is not in srcs, out, tools or tool_files.", label)
 					}