Skip to content

update: leave a Scoop install to Scoop, like Homebrew - #411

Merged
rromenskyi merged 2 commits into
mainfrom
scoop-update
Nov 19, 2026
Merged

rromenskyi merged 2 commits into
mainfrom
scoop-update

Conversation

@rromenskyi

Copy link
Copy Markdown
Contributor

ipsupport-code is now in the Scoop bucket ipsupport-llc/scoop-bucket, and the bucket follows every stable release (#410). Before this PR, update would replace the exe inside Scoop's app dir, leaving Scoop's recorded version wrong.

  • selfupdate.PackageManager() (by, update string) replaces BrewUpgrade(): Homebrew as before, then Scoop. The Scoop check matches <root>\apps\ipsupport-code\<version|current>\ with any root and any case. Scoop's shims (ipsupport-code, ipco) start that exe, so os.Executable points there.
  • A global install (scoop install -g, under $SCOOP_GLOBAL, by default C:\ProgramData\scoop) gets scoop update -g ipsupport-code. Without -g, scoop update only looks at user installs and answers "isn't installed" (Confirm-InstallationStatus in Scoop's lib/core.ps1).
  • update, /update, Apply and the startup notice use it. The notice also pins the channel to stable for Scoop installs, since the manifest only follows stable releases.
  • README: Scoop install section.

Tests:

  • TestScoopInstallIsUpdatedByScoop: user, global, custom global root, version dir vs current, case, plus non-matches (install.ps1 dir, shims dir, other app, a current dir that isn't under apps).
  • TestPackageManagerNamesTheInstaller.
  • TestApplyRefusesAManagedInstall: Apply refuses before touching the network.

Sabotage check: 8 mutations (dropping the Scoop branch, the apps check, lowercasing, global-root normalisation, the ProgramData default, -g, the brew name, the Apply guard), all caught. go test -race ./... passes and GOOS=windows builds. Not run on real Windows with Scoop.

🤖 Generated with Claude Code

ipsupport-code is in the ipsupport-llc Scoop bucket now. A Scoop install
lives in <root>\apps\ipsupport-code\<version|current>\; replacing that exe
in place leaves Scoop believing in a version that isn't there. update,
/update, Apply and the startup notice now ask selfupdate.PackageManager()
(Homebrew or Scoop) and point at its command instead: `scoop update
ipsupport-code`, or `scoop update -g ipsupport-code` for a global install
($SCOOP_GLOBAL, by default C:\ProgramData\scoop), which plain `scoop
update` doesn't find. README: Scoop install section.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

From review: a global root set with `scoop config global_path` (no
$SCOOP_GLOBAL) got the plain `scoop update` hint, which doesn't find a
global install; and a user root under ProgramData\scoop got `-g`. The
global root is now resolved like Scoop's lib/core.ps1: $SCOOP_GLOBAL, then
global_path in $XDG_CONFIG_HOME or %USERPROFILE%\.config\scoop\config.json,
then %ProgramData%\scoop; `-g` only for installs under it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rromenskyi

Copy link
Copy Markdown
Contributor Author

Reviews (codex, muse, devin): the shared finding is applied. The global root is now resolved as Scoop's lib/core.ps1 does: $SCOOP_GLOBAL, then global_path in its config.json ($XDG_CONFIG_HOME or %USERPROFILE%\.config), then %ProgramData%\scoop. -g is suggested only for installs under that root, which also fixes a user root under ProgramData\scoop getting -g. Tests cover each step; mutation check: 10 mutations, all caught. Accepted as is: a binary someone unzips by hand into …\apps\ipsupport-code\<dir>\ is treated as Scoop's (refusing to self-update is the safe side); not mentioning that Scoop needs the app closed and -g needs admin, since Scoop's own errors say both; detection isn't gated to Windows (the path shape doesn't occur elsewhere).

@rromenskyi
rromenskyi merged commit 5e70805 into main Nov 19, 2026
2 checks passed
@rromenskyi
rromenskyi deleted the scoop-update branch November 19, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant