Skip to content

Commit

Permalink
trim space from proxy url.
Browse files Browse the repository at this point in the history
  • Loading branch information
TingluoHuang committed Aug 17, 2016
1 parent 2b98d30 commit 9cd0094
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ public void ApplyProxySettings()
// we expect the first line of the file is the proxy url
Trace.Verbose($"Try read proxy setting from file: {proxyConfigFile}.");
ProxyUrl = File.ReadLines(proxyConfigFile).FirstOrDefault() ?? string.Empty;
ProxyUrl = ProxyUrl.Trim();
Trace.Verbose($"{ProxyUrl}");
}

if (string.IsNullOrEmpty(ProxyUrl))
{
Trace.Verbose("Try read proxy setting from environment variable: 'VSTS_HTTP_PROXY'.");
ProxyUrl = Environment.GetEnvironmentVariable("VSTS_HTTP_PROXY") ?? string.Empty;
ProxyUrl = ProxyUrl.Trim();
Trace.Verbose($"{ProxyUrl}");
}

Expand Down

0 comments on commit 9cd0094

Please sign in to comment.