Skip to content

Commit

Permalink
[7.1.0] [credentialhelper] Support paths relative to %install_base% (
Browse files Browse the repository at this point in the history
…#21532)

This allows us to ship built-in credential helpers (e.g., for `.netrc`)
and move them out of Bazel core.

Closes #21419.

Commit
ed5d444

PiperOrigin-RevId: 611551189
Change-Id: I89c036ef87d4a1eac11c2eff5076e7884d274bb9

Co-authored-by: Yannic Bonenberger <[email protected]>
Co-authored-by: Yun Peng <[email protected]>
  • Loading branch information
3 people authored Mar 4, 2024
1 parent 691bc2d commit 8c2e718
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,16 @@ static CommandLinePathFactory create(FileSystem fileSystem, BlazeDirectories dir
ImmutableMap.Builder<String, Path> 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());
}

Expand Down

0 comments on commit 8c2e718

Please sign in to comment.