mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Build: Fix a check to avoid null argument in case 'vcvarsall.bat' is absent (#7218)
This commit is contained in:
+1
-1
@@ -225,7 +225,7 @@ function Start-BuildNativeWindowsBinaries {
|
||||
$vcvarsallbatPath = (Get-ChildItem $vcPath -Filter vcvarsall.bat -Recurse -File | Select-Object -First 1).FullName
|
||||
}
|
||||
|
||||
if ((Test-Path -Path $vcvarsallbatPath) -eq $false) {
|
||||
if ([string]::IsNullOrEmpty($vcvarsallbatPath) -or (Test-Path -Path $vcvarsallbatPath) -eq $false) {
|
||||
throw "Could not find Visual Studio vcvarsall.bat at $vcvarsallbatPath. Please ensure the optional feature 'Common Tools for Visual C++' is installed."
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user