Do not put blaze-grepped_includes_<lang> files inside tree artifact directories
RELNOTES: None.
@@ -283,8 +283,9 @@ public class SpawnIncludeScanner {
ActionExecutionContext actionExecutionContext,
Artifact grepIncludes,
GrepIncludesFileType fileType,
- boolean placeNextToFile)
+ boolean isOutputFile)
throws IOException, ExecException, InterruptedException {
+ boolean placeNextToFile = isOutputFile && !file.hasParent();
Path output = getIncludesOutput(file, actionExecutionContext.getPathResolver(), fileType,
placeNextToFile);
if (!inMemoryOutput) {
