mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
Make cygwin install non-fatal
Cygwin mirror can be unreachable from Azure VMs. Don't block the entire bootstrap if cygwin fails to install. [build images]
This commit is contained in:
@@ -246,11 +246,16 @@ function Install-Make {
|
||||
}
|
||||
|
||||
function Install-Cygwin {
|
||||
Install-Scoop-Package cygwin
|
||||
# Scoop installs to ~/scoop/apps/cygwin/current
|
||||
$cygwinBin = Join-Path $env:USERPROFILE "scoop\apps\cygwin\current\bin"
|
||||
if (Test-Path $cygwinBin) {
|
||||
Add-To-Path $cygwinBin -Scope User
|
||||
# Cygwin's default mirror (mirrors.kernel.org) can be unreachable from Azure.
|
||||
# Make this non-fatal — the build will fail later if cygwin is actually needed.
|
||||
try {
|
||||
Install-Scoop-Package cygwin
|
||||
$cygwinBin = Join-Path $env:USERPROFILE "scoop\apps\cygwin\current\bin"
|
||||
if (Test-Path $cygwinBin) {
|
||||
Add-To-Path $cygwinBin -Scope User
|
||||
}
|
||||
} catch {
|
||||
Write-Warning "Cygwin installation failed (non-fatal): $_"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user