Skip to content

Commit eddb1e4

Browse files
Fix PowerShell install script to find binary recursively in extracted archive
Use Get-ChildItem -Recurse to locate the exe instead of assuming a flat zip structure, which failed when Expand-Archive created subdirectories. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 79a95a4 commit eddb1e4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

scripts/install.ps1.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@
6969
}
7070

7171
Expand-Archive -Path $TmpFile -DestinationPath $TmpExtract -Force
72-
Copy-Item -Path (Join-Path $TmpExtract "$BinaryName.exe") -Destination (Join-Path $InstallDir "$BinaryName.exe") -Force
72+
$ExePath = Get-ChildItem -Path $TmpExtract -Filter "$BinaryName.exe" -Recurse | Select-Object -First 1
73+
if (-not $ExePath) {
74+
Fail "Could not find $BinaryName.exe in extracted archive"
75+
return
76+
}
77+
Copy-Item -Path $ExePath.FullName -Destination (Join-Path $InstallDir "$BinaryName.exe") -Force
7378

7479
# Cleanup
7580
Remove-Item -Path $TmpFile -Force

0 commit comments

Comments
 (0)