Summary
Follow-up from PR #157. The new self-update flow has two Windows gaps that will silently fail.
Affected code
`internal/updater/updater.go:526-528` and asset selection at line 380.
Issues
- Asset selector expects `.tar.gz` for all platforms. Windows builds commonly ship as `.zip`. `SelectAsset` uses `strings.Contains(name, ""+goos+""+goarch+".tar.gz")` which won't match a `_windows_amd64.zip` asset.
- `os.Rename` on a running Windows executable typically fails because Windows locks the binary while it's executing. macOS/Linux unlink-on-rename works fine; Windows does not.
- `buildMainBinary` does add `.exe` for Windows, but the release-channel path doesn't, so even if a Windows tarball matched the suffix, the extracted binary wouldn't have the right name to be picked up.
Suggested fix
- `SelectAsset`: detect Windows, look for `.zip` suffix.
- Add a `.zip` extraction helper (`archive/zip` package) parallel to `extractBinaryFromTarGz`.
- For `installBinary` on Windows, use the "rename-self-then-replace" pattern: rename the current exe to `clanker.exe.old`, write the new exe in place, schedule the old one for deletion on next launch (or use `MoveFileEx` with `MOVEFILE_DELAY_UNTIL_REBOOT`).
Priority
Low — project's CI matrix is macOS-only. Filing for visibility; not blocking.
References
Summary
Follow-up from PR #157. The new self-update flow has two Windows gaps that will silently fail.
Affected code
`internal/updater/updater.go:526-528` and asset selection at line 380.
Issues
Suggested fix
Priority
Low — project's CI matrix is macOS-only. Filing for visibility; not blocking.
References