Merge pull request #7205 from ScottNZ/nuget
Make fetch-thirdparty-deps.ps1 work on more Windows platforms.
This commit is contained in:
5
thirdparty/fetch-thirdparty-deps.ps1
vendored
5
thirdparty/fetch-thirdparty-deps.ps1
vendored
@@ -1,7 +1,10 @@
|
||||
if (!(Test-Path "nuget.exe"))
|
||||
{
|
||||
echo "Fetching NuGet."
|
||||
Invoke-WebRequest "http://nuget.org/nuget.exe" -OutFile "nuget.exe"
|
||||
# Work around PowerShell's Invoke-WebRequest not being available on some versions of PowerShell by using the BCL.
|
||||
# To do that we need to work around further and use absolute paths because DownloadFile is not aware of PowerShell's current directory.
|
||||
$target = Join-Path $pwd.ToString() "nuget.exe"
|
||||
(New-Object System.Net.WebClient).DownloadFile("http://nuget.org/nuget.exe", $target)
|
||||
}
|
||||
|
||||
if (!(Test-Path "StyleCop.dll"))
|
||||
|
||||
Reference in New Issue
Block a user