Repository navigation
fix: count a prebuilt CLI install as complete on rerun - #45
Conversation
Since shorebird#4529, an install of a release commit downloads a prebuilt CLI (bin/cache/shorebird + shorebird-cli.stamp) and never builds bin/cache/shorebird.snapshot, so rerunning the installer called a working install incomplete and told users to --force reinstall. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Adversarial review (head 05ec568) No blockers found. Checked against shorebird Is the stamp a sound "complete" marker? Yes, on both platforms.
Any other code that assumes the snapshot? No. The failed-install cleanup in both scripts ( Non-blocking:
Risk is low: two condition changes, and both still fail closed (absent marker leads to "incomplete" plus a |
|
Thanks. (1) Fixed the description: Windows failed too, so the ps1 change is needed. (2) I'm leaving out the extra binary check. If the binary is missing, the launcher's next |
|
lgtm |
Why
Since shorebird#4529 (shorebirdtech/shorebird#4529), installing a release commit downloads a prebuilt CLI (
bin/cache/shorebird+bin/cache/shorebird-cli.stamp) and never buildsbin/cache/shorebird.snapshot. The installer's "already installed?" check still looked only for the snapshot. So every user who reruns the installer on a working install is told it is incomplete and to reinstall with--force, which deletes it and downloads it again. This repo's e2e "Rerun installer" step now fails on macOS, Linux and Windows, on every PR (e.g. https://github.com/shorebirdtech/install/actions/runs/46759839644).Fix
Treat either marker as a complete install:
shorebird.snapshot(non-release commit, compiled) orshorebird-cli.stamp(release commit, prebuilt; the launcher writes it only after the downloaded binary passes--version,third_party/flutter/bin/internal/shared.sh:162-169). Same change in install.sh and install.ps1.Tested locally on macOS: ran install.sh twice into a temp HOME. The first run installed the prebuilt CLI; the second now prints "Shorebird is already installed".
What could go wrong
A real half-finished install that somehow has the stamp would now be called "already installed" (rerun suggests
shorebird upgrade). The stamp is written last, after the binary has been verified, so that shouldn't happen.Landing
Lands once approved and green. Unblocks #44's CI.
Screenshots
No visible change: CLI install script only.
🤖 Generated with Claude Code