Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ailure Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…date on Linux Fixes #18. The old approach used selfupdate.Apply() which fails on Windows because (a) the release asset is an NSIS installer, not a raw binary, and (b) Program Files requires UAC elevation for writes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…propagation test The defer os.Remove was deleting the temp file before the user could act on the "install manually" error message. Now only removed on success. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Both Linux and Windows builds now run on every PR, with 3-day artifact retention. Tests run first in a separate job; builds only start after tests pass. Windows artifacts (binary + NSIS setup) are downloadable from the Actions tab for local testing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Fixes #18 — App update via "Download & Install" button fails on Windows with "Access is denied."
Root cause (two issues):
*-windows-amd64-setup) is an NSIS installer, not a raw binary — piping it throughselfupdate.Apply()would corrupt the executableC:\Program Files\requires UAC elevation for writes;selfupdate.Apply()writes without elevationFix: Split
DownloadAndInstall()into platform-specific strategies:exec.Command(NSIS handles UAC) → app quits so installer can replace locked exeselfupdate.Apply()in-place (unchanged behavior, improved error messaging)Returns
InstallResult{restart_required: bool}so the frontend shows the appropriate message:Changes
internal/features/updater/service.go— RefactoredDownloadAndInstall()to download to temp, delegate toapplyPlatformUpdate()internal/features/updater/install_windows.go— New: launches NSIS installer, schedules app quitinternal/features/updater/install_linux.go— New:selfupdate.Apply()from temp file, preserves file on failureinternal/features/updater/model.go— AddedInstallResulttypeinternal/features/updater/install_test.go— Regression test + 7 behavior tests (18 total updater tests)main.go— WiresquitFunccallback on updater servicerestart_requiredin settings componentTest plan
selfupdate.Apply()fails on read-only dirs (the original bug)go buildcompiles cleanlyCI (
build-linux.yml) will run automatically on this PR.🤖 Generated with Claude Code