Suppress MacOS package manager output (#21244)

This commit is contained in:
xtqqczze 2024-02-27 23:13:40 +00:00 committed by GitHub
parent c3594c5969
commit f8ca532dd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2214,9 +2214,9 @@ function Start-PSBootstrap {
}
} elseif ($environment.IsMacOS) {
if ($environment.UsingHomebrew) {
$PackageManager = "brew"
$baseCommand = "brew install --quiet"
} elseif ($environment.UsingMacports) {
$PackageManager = "$sudo port"
$baseCommand = "$sudo port -q install"
}
# wget for downloading dotnet
@ -2227,7 +2227,7 @@ function Start-PSBootstrap {
# Install dependencies
# ignore exitcode, because they may be already installed
Start-NativeExecution ([ScriptBlock]::Create("$PackageManager install $Deps")) -IgnoreExitcode
Start-NativeExecution ([ScriptBlock]::Create("$baseCommand $Deps")) -IgnoreExitcode
} elseif ($environment.IsLinux -and $environment.IsAlpine) {
$Deps += 'libunwind', 'libcurl', 'bash', 'build-base', 'git', 'curl', 'wget'