Commit e1f6290d authored by Jason R. Coombs's avatar Jason R. Coombs

Extract powershell command to correct long line

--HG--
extra : amend_source : 1a6e3e5d0f62c1ce54c0d42ce806bd13541642ca
parent 5b8bc6f8
......@@ -166,10 +166,16 @@ def download_file_powershell(url, target):
trust). Raise an exception if the command cannot complete.
"""
target = os.path.abspath(target)
ps_cmd = (
"[System.Net.WebRequest]::DefaultWebProxy.Credentials = "
"[System.Net.CredentialCache]::DefaultCredentials; "
"(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)"
% vars()
)
cmd = [
'powershell',
'-Command',
"[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials; (new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(),
ps_cmd,
]
_clean_check(cmd, target)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment