Created
April 18, 2020 10:06
-
-
Save idiotandrobot/c0db42842d0a6972f90fc43423aaca1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Test-Path "nuget.exe") { | |
Invoke-Expression "./nuget restore" | |
} | |
elseif((Get-Command "nuget" -ErrorAction SilentlyContinue) -ne $null) { | |
nuget restore | |
} | |
else { | |
"Nuget was not found and is required to run bootstrap.ps1. Download and retry now?" | |
choice /c yn | |
if ($LASTEXITCODE -eq 1) { | |
"Downloading nuget..." | |
$nugetLocation = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" | |
(New-Object Net.WebClient).DownloadFile($nugetLocation, "$PSScriptRoot\nuget.exe") | |
Invoke-Expression "./nuget restore" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment