Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  (GH-1141) Fix: Constant Proxy Null Reference Error
  (doc) Note PowerShell period limitation
  • Loading branch information
ferventcoder committed Feb 17, 2017
2 parents 1c0ca10 + 9897403 commit cf26b8b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/chocolatey.resources/helpers/functions/Get-WebFile.ps1
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ the local options are parsed.
(`` `""value`"" ``) or apostrophes (`'value'`). Using the combination
allows for both shells to work without issue, except for when the next
section applies.
* **Periods in PowerShell**: If you need to pass a period as part of a
value or a path, PowerShell doesn't always handle it well. Please
quote those values using ""Quote Values"" section above.
* **Pass quotes in arguments**: When you need to pass quoted values to
to something like a native installer, you are in for a world of fun. In
cmd.exe you must pass it like this: `-ia ""/yo=""""Spaces spaces""""""`. In
Expand Down

0 comments on commit cf26b8b

Please sign in to comment.