diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommandLinePathFactory.java b/src/main/java/com/google/devtools/build/lib/runtime/CommandLinePathFactory.java index 886b3efdadbb79..47f975bed83ecf 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/CommandLinePathFactory.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/CommandLinePathFactory.java @@ -66,11 +66,16 @@ static CommandLinePathFactory create(FileSystem fileSystem, BlazeDirectories dir ImmutableMap.Builder wellKnownRoots = ImmutableMap.builder(); // This is necessary because some tests don't have a workspace set. - Path workspace = directories.getWorkspace(); + var workspace = directories.getWorkspace(); if (workspace != null) { wellKnownRoots.put("workspace", workspace); } + var installBase = directories.getInstallBase(); + if (installBase != null) { + wellKnownRoots.put("install_base", installBase); + } + return new CommandLinePathFactory(fileSystem, wellKnownRoots.buildOrThrow()); }