Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: tools/observatory_tool.py

Issue 2724483003: Have observatory_tool always invoke pub with no HTTP_PROXY environment variable set (Closed)
Patch Set: more context Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/observatory_tool.py
diff --git a/tools/observatory_tool.py b/tools/observatory_tool.py
index e82c72c0bf371403d1e178261ffcdf1df421e1b0..8450a07d62ad057fa6d88efcde39609fc21020b5 100755
--- a/tools/observatory_tool.py
+++ b/tools/observatory_tool.py
@@ -43,7 +43,17 @@ usage = """observatory_tool.py [options]"""
# True, and return the return code.
def RunCommand(command, always_silent=False):
try:
- subprocess.check_output(command, stderr=subprocess.STDOUT)
+ # Dart IO respects the following environment variables to configure the
+ # HttpClient proxy: https://api.dartlang.org/stable/1.22.1/dart-io/HttpClient/findProxyFromEnvironment.html
+ # We strip these to avoid problems with pub build and transformers.
+ no_http_proxy_env = os.environ.copy()
+ no_http_proxy_env.pop('http_proxy', None)
+ no_http_proxy_env.pop('HTTP_PROXY', None)
+ no_http_proxy_env.pop('https_proxy', None)
+ no_http_proxy_env.pop('HTTPS_PROXY', None)
+ subprocess.check_output(command,
+ stderr=subprocess.STDOUT,
+ env=no_http_proxy_env)
return 0
except subprocess.CalledProcessError as e:
if not always_silent:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698