Skip to content

Commit

Permalink
Use SYSTEMROOT env variable for powershell detection (#29803)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7454dc9)
  • Loading branch information
musm authored and KristofferC committed Dec 12, 2018
1 parent 87c18f9 commit 441a887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/download.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

if Sys.iswindows()
function download(url::AbstractString, filename::AbstractString)
ps = "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
ps = joinpath(get(ENV, "SYSTEMROOT", "C:\\Windows"), "System32\\WindowsPowerShell\\v1.0\\powershell.exe")
tls12 = "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
client = "New-Object System.Net.Webclient"
# in the following we escape ' with '' (see https://ss64.com/ps/syntax-esc.html)
Expand Down

0 comments on commit 441a887

Please sign in to comment.