Repository navigation
Conversation
download returns "", "", err on every error path, which clears the named result dir before the deferred os.RemoveAll(dir) runs. The cleanup then removes "" and the wails-update-* directory with the partial artifact is left behind. Keep the directory in a local for the deferred cleanup. Fixes wailsapp#6185
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: wailsapp/wails/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. Walkthrough
ChangesUpdater download cleanup
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The change fixes failed-download staging cleanup without altering successful downloads or error handling. No actionable merge-blocking risk remains; merge after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit watched the download fail, Comment |
|
Automated v3 GA test run (taliesin-ai) for head
* Same failure on master The app was not launched (no GUI session over SSH). This run doesn't review or approve the PR. |
Description
Updater.downloadreturns"", "", erron every error path. With named results, that assignment runs before the deferred cleanup, sodiris already""when the deferredos.RemoveAll(dir)reads it. Nothing gets removed and thewails-update-*directory with the partial.artifactstays in the temp dir after every failed download, as described in the issue.The fix keeps the directory in a local (
tmpDir) for the deferred cleanup and the success return. The error paths and their return values are unchanged.Fixes #6185
Type of change
How Has This Been Tested?
TestDownloadAndInstall_DownloadError_RemovesStagingDirmakes the provider fail the transfer withio.ErrUnexpectedEOFand counts thewails-update-*directories before and after, the same wayTestDownloadAndInstall_FailedFlow_RemovesStagingDirdoes for the verify stage. Onmasterit fails withstaging dir leaked: 0 → 1; with the fix it passes.From
v3:go test ./pkg/updater/...passes (all six packages),go vet ./pkg/updater/is clean and both changed files aregofmt-clean.Test Configuration
macOS 26 (arm64), Go 1.26.2. These are package tests only;
wails doctorwas not run since no app was built.Checklist:
website/src/pages/changelog.mdxwith details of this PR (v3 changelog entries are added automatically)Summary by CodeRabbit