fix(installer): resolve Windows installation and upgrade failures - #208
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows installation can fail to detect an x64 machine or download a ZIP into a temporary directory containing brackets. Upgrades can continue to use an older CLI or daemon, and ARM64 installation can request an archive that the release does not publish.
The installer now:
File.WriteAllBytesusing the raw response bytes, directories are created withDirectory.CreateDirectory, and checksum checks and cleanup use-LiteralPath. ZIP extraction uses .NET to avoid Windows PowerShell 5.1's wildcard destination handling.New-Itemhas no-LiteralPathparameter.daemon.jsonunder the currentBSK_HOME(or the default user home) and tells the user to stop any running daemon, remove that file, and retry. Fresh installations no longer report a daemon restart.Get-Command bsk -Allthere.Changes are limited to
install.ps1and its regression tests.Validation:
Invoke-WebRequestand production disk-writing code run unchanged. It no longer substitutesFile.Copyfor the download.defa542fails in the realInvoke-WebRequest -OutFilecall withFileOpenFailurefortemp [literal], before checksum verification.f995620passes the full installer suite with real HTTP downloads and production disk writes on both Windows PowerShell 5.1 and PowerShell 7.git diff --checkpasses.