diff options
author | Kristina Chodorow <kchodorow@google.com> | 2016-05-05 17:48:55 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2016-05-05 19:10:33 +0000 |
commit | 960151d7acd0106e62f3df155b52117eeccde419 (patch) | |
tree | 5800c2ec0f8b160677b6d72420eb6606c98e8dd4 /src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java | |
parent | 2c3119a393b5d32d6de7b5449c54ad57d162aa66 (diff) |
Check for lower-case versions of HTTP(S)_PROXY
wget accepts http_proxy and https_proxy.
RELNOTES: Proxy settings can now be specified in http_proxy and https_proxy
environment variables (not just HTTP_PROXY and HTTPS_PROXY).
--
MOS_MIGRATED_REVID=121594117
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java index 6e39a17a73..d6f143f873 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java @@ -36,6 +36,7 @@ import com.google.devtools.build.skyframe.SkyValue; import java.io.IOException; import java.util.Arrays; +import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import javax.annotation.Nullable; @@ -61,6 +62,8 @@ public final class RepositoryDelegatorFunction implements SkyFunction { // command is a fetch. Remote repository lookups are only allowed during fetches. private final AtomicBoolean isFetch; + private Map<String, String> clientEnvironment; + public RepositoryDelegatorFunction( ImmutableMap<String, RepositoryFunction> handlers, @Nullable RepositoryFunction skylarkHandler, @@ -70,6 +73,10 @@ public final class RepositoryDelegatorFunction implements SkyFunction { this.isFetch = isFetch; } + public void setClientEnvironment(Map<String, String> clientEnvironment) { + this.clientEnvironment = clientEnvironment; + } + private void setupRepositoryRoot(Path repoRoot) throws RepositoryFunctionException { try { FileSystemUtils.deleteTree(repoRoot); @@ -107,6 +114,7 @@ public final class RepositoryDelegatorFunction implements SkyFunction { Path repoRoot = RepositoryFunction.getExternalRepositoryDirectory(directories).getRelative(rule.getName()); + handler.setClientEnvironment(clientEnvironment); if (handler.isLocal(rule)) { // Local repositories are always fetched because the operation is generally fast and they do // not depend on non-local data, so it does not make much sense to try to catch from across |