can you please review this trail?…
- User
can you please review this trail? https://entire.io/gh/entireio/cli/trails/1201/point-windows-unknown-installer-updates-at-install-ps1
Assistant
I'll pull up the trail with the entire CLI, then review its changes.
Assistant
Checking how the callers of the update-command string frame it, and how install.ps1 behaves when Scoop is present.
Assistant
Running lint on the package for both platforms before I write up.
Assistant
Local lint is blocked by the known golangci-lint v1 shadow, so lint is unverified here; CI runs it. Everything else checks out.
Verdict: looks good to merge. The eleven commits on top of the installer branch do what the description says. Vet passes for both GOOS targets, the unix test suite passes, and every Windows-only test name matches the CI job's
(Windows|MSYS)filter so they actually run on windows-latest. I found no correctness bugs. Four notes, none blocking:-
install.ps1 prefers Scoop when it is present. A user running from an unknown location (say
.local\bin) who also has Scoop will get a second copy installed via Scoop, with the old binary left on PATH. The installer's PATH-conflict warning covers this, so it is a product question rather than a defect: is that acceptable, or should the printed hint say "this may install via Scoop"?
-
- User
create findings 2,3 and 4. I don't get what you mean by finding 1
Assistant
Let me clarify finding 1 first, then push the other three.
Finding 1 explained. The new Windows fallback prints the install.ps1 one-liner for any binary that is not under a Scoop or mise root. But install.ps1 itself checks for a
scoopcommand and, if it finds one, installs through Scoop instead of dropping a binary in.local\bin. So picture a user who installed entire manually toC:\Users\x\.local\bin\entire.exeand separately has Scoop on their machine for other tools. Entire tells them to run the one-liner. The one-liner sees Scoop and installs a second entire underscoop\apps\entire. The old copy in.local\binstays where it was, still on PATH, still the old version. Which one wins depends on PATH order, and the old one may keep printing the update nudge. install.ps1 does warn about the duplicate on PATH, so the user is told, but the printed hint promises an update and may deliver a parallel install instead. It is a UX question, not a code bug, which is why I did not push it as a finding.Assistant
Three findings are now on trail 1201, all severity low:
- README duplication guard test at
versioncheck_windows.go:18-19, with a sketch of the test. - Windows mise fixture at
autoupdate_windows_test.go:40, suggesting a realAppData\Local\mise\installspath. - CutPrefix ordering nit at
versioncheck_windows.go:78, with the reordered snippet.
Finding 1 stays off the trail. In short: the printed install.ps1 hint can install a second copy via Scoop instead of updating the existing manual install, because install.ps1 prefers Scoop whenever the
scoopcommand exists. If you decide that deserves a hint change, say so and I will add it.- README duplication guard test at
- User
what alternatives d u propose for finding 1?
Assistant
Five options, roughly in order of how much they fix versus how much they touch:
-
Explicit
-InstallDiropts out of Scoop (recommended). install.ps1 already takes-InstallDir, but the Scoop branch ignores it. Make an explicitly passed (via ) skip Scoop and do a direct install to that directory. The CLI fallback already knows where the running exe lives, so it prints the scriptblock form with for both channels. Result: the update lands in place over the old binary, no second copy, no new flag, and README users who just paste the bare one-liner keep today's Scoop-first behavior.
-