1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-20 21:17:46 +00:00
nixpkgs/pkgs/development/tools/build-managers/bazel/strict_action_env.patch
Guillaume Bouchard 20752ba4f7 bazel: improve strict action env context
- Bazel strict action env set a default PATH to
`/bin/:/usr/bin:/usr/local/bin`. This was previously changed to disable
this behavior to improve hermeticity. However the previous change was
only removing `/bin:/usr/bin`, keeping `/usr/local/bin`, this commit
also remove this entry.
2019-12-04 12:59:32 +01:00

14 lines
787 B
Diff

diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
index a70b5559bc..10bdffe961 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
@@ -466,7 +466,7 @@ public class BazelRuleClassProvider {
// Note that --action_env does not propagate to the host config, so it is not a viable
// workaround when a genrule is itself built in the host config (e.g. nested genrules). See
// #8536.
- return "/bin:/usr/bin:/usr/local/bin";
+ return "@strictActionEnvPatch@";
}
String newPath = "";