Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion tools/DevCheck/DevCheck.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Param(

[Switch]$NoInteractive=$false,

[String]$NugetExe='.user\nuget.exe',
[String]$NugetExe="$PSScriptRoot\..\..\.user\nuget.exe",

[String]$NugetMinVersion="6.14.0.116",

Expand Down Expand Up @@ -1964,6 +1964,16 @@ function Install-NugetExe

$url = 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe'
$file = [IO.Path]::GetFullPath($NugetExe)

# Check if the directory exists
$fileDir = [IO.Path]::GetDirectoryName($file)
if (-not(Test-Path -Path $fileDir -PathType Container))
{
Write-Host "...ERROR: $fileDir doesn't exist" -ForegroundColor Red -BackgroundColor Black
$global:issues++
return $false
}

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
Expand Down Expand Up @@ -2043,6 +2053,10 @@ Write-Verbose "Processor...$cpu"
$project_root = Get-ProjectRoot
Write-Output "Windows App SDK location...$project_root"

# Ensure .temp and .user exist
$null = Get-TempPath
$null = Get-UserPath

if (($CheckAll -ne $false) -Or ($ShowSystemInfo -ne $false))
{
Get-SystemInfo
Expand Down