Apply pending Windows binary replacements
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s

This commit is contained in:
DuProcess
2026-07-16 22:45:41 -04:00
parent 5a9d9df4ae
commit 478ecdfb24
2 changed files with 37 additions and 0 deletions
+25
View File
@@ -353,6 +353,30 @@ exit 1
Start-Process -FilePath $ps -ArgumentList @("-NoProfile", "-EncodedCommand", $encoded) -WindowStyle Hidden | Out-Null
}
function Apply-PendingBinaryReplacements($Dir) {
if (-not (Test-Path -LiteralPath $Dir)) {
return
}
Get-ChildItem -LiteralPath $Dir -File -Filter "*.pending.*" | ForEach-Object {
$pending = $_.FullName
$name = $_.Name
$marker = ".pending."
$index = $name.LastIndexOf($marker)
if ($index -lt 1) {
return
}
$destinationName = $name.Substring(0, $index)
$destination = Join-Path $Dir $destinationName
try {
Move-Item -LiteralPath $pending -Destination $destination -Force
Write-Info "Applied pending Dosh binary replacement: $destination"
}
catch {
Write-Warning "pending Dosh binary replacement still waiting: $destination"
}
}
}
function Normalize-PathForCompare($Path) {
[System.IO.Path]::GetFullPath($Path).TrimEnd(
[System.IO.Path]::DirectorySeparatorChar,
@@ -437,6 +461,7 @@ function Write-Utf8NoBom($Path, $Content) {
$bindir = Join-Path $Prefix "bin"
$configDir = Join-Path $HOME ".config\dosh"
New-Item -ItemType Directory -Force -Path $bindir, $configDir | Out-Null
Apply-PendingBinaryReplacements $bindir
function Install-Prebuilt {
if (Latest-ReleaseIsStale) {