diff --git a/tools/DevCheck/DevCheck.ps1 b/tools/DevCheck/DevCheck.ps1 index fc810f8e7f..1838632038 100644 --- a/tools/DevCheck/DevCheck.ps1 +++ b/tools/DevCheck/DevCheck.ps1 @@ -1964,6 +1964,14 @@ function Install-NugetExe $url = 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe' $file = [IO.Path]::GetFullPath($NugetExe) + + # Create directory if it doesn't exist + $fileDir = [IO.Path]::GetDirectoryName($file) + if (-not(Test-Path -Path $fileDir -PathType Container)) + { + $null = New-Item -ItemType Directory -Path $fileDir + } + Write-Host "Downloading nuget.exe from $url..." Write-Verbose "Executing: curl.exe --output $file -L -# $url" $null = Start-Process curl.exe -ArgumentList "--output $file -L -# $url" -Wait -NoNewWindow -PassThru