Skip to content

Commit

Permalink
Merge branch 'pr1142' into stable
Browse files Browse the repository at this point in the history
* pr1142:
  (GH-1141) Fix: Constant Proxy Null Reference Error
  • Loading branch information
ferventcoder committed Feb 17, 2017
2 parents c873be5 + eb39536 commit 9897403
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/chocolatey.resources/helpers/functions/Get-WebFile.ps1
Expand Up @@ -133,7 +133,7 @@ param(
Write-Host "Using explicit proxy server '$explicitProxy'."
$req.Proxy = $proxy

} elseif (!$webclient.Proxy.IsBypassed($url))
} elseif ($webclient.Proxy -and !$webclient.Proxy.IsBypassed($url))
{
# system proxy (pass through)
$creds = [net.CredentialCache]::DefaultCredentials
Expand Down
Expand Up @@ -130,7 +130,7 @@ param(
Write-Debug "Using explicit proxy server '$explicitProxy'."
$request.Proxy = $proxy

} elseif (!$client.Proxy.IsBypassed($url))
} elseif ($client.Proxy -and !$client.Proxy.IsBypassed($url))
{
# system proxy (pass through)
$creds = [Net.CredentialCache]::DefaultCredentials
Expand Down
Expand Up @@ -87,7 +87,7 @@ param(
Write-Host "Using explicit proxy server '$explicitProxy'."
$request.Proxy = $proxy

} elseif (!$client.Proxy.IsBypassed($url))
} elseif ($client.Proxy -and !$client.Proxy.IsBypassed($url))
{
# system proxy (pass through)
$creds = [Net.CredentialCache]::DefaultCredentials
Expand Down

0 comments on commit 9897403

Please sign in to comment.