Merge pull request #7205 from ScottNZ/nuget

Make fetch-thirdparty-deps.ps1 work on more Windows platforms.
This commit is contained in:
Paul Chote
2014-12-28 10:13:59 +13:00

View File

@@ -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"))