Repository navigation
fix(cli): recognize standalone and Homebrew launchers in doctor and reinstall - #381
Merged
Merged
Conversation
…einstall Signed-off-by: kombuchapunk <35040017+kombuchapunk@users.noreply.github.com>
…d standalone app, add changeset Signed-off-by: kombuchapunk <35040017+kombuchapunk@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
sessionpipe doctorandsessionpipe reinstallwhen the activesessionpipecommand was installed via our official standalone installer (website/public/install.sh) or Homebrew (scripts/homebrew-formula.mjs), especially when an older orphaned npm install (e.g.0.18.6in~/.local/lib/node_modules/sessionpipe) remains on disk.Root Cause
look()inpackages/cli/src/reinstall/find.tsonly resolved npm symlinks (binTarget) and direct symlinks to.../dist/cli.js. Official standalone launchers (~/.local/bin/sessionpipe) and Homebrew wrappers (/opt/homebrew/bin/sessionpipe -> ../Cellar/.../bin/sessionpipe) fell intostrangers, clearedtyped, triggeredinWay, and causedreinstallto refuse withmv -n ~/.local/bin/sessionpipe ... && npx -y sessionpipe@latest reinstall.Changes
packages/cli/src/reinstall/find.ts: adds bounded, read-onlyreadLauncher()(max 4 KiB plain file, never executed, rejects CRLF/FIFOs/shell metacharacters/node_modules/out-of-reach targets) recognizing standalone (install.sh) and Homebrew launchers onPATH(including Homebrew Cellar symlinks), plus broken standalone installs whereapp/,.standalone, orpackage.jsonis missing.packages/cli/src/reinstall/plan.ts,run.ts,page.ts: keeps healthy standalone and Homebrew installs untouched (stays) while removing provably-ours leftover npm copies (without weakeningours.tsdeletion proofs and without requiring npm/network), prints an upgrade note if a newer release is out, and directs broken/outdated managed installs tocurl -fsSL https://sessionpipe.org/install.sh | shorbrew upgrade/brew reinstall(nevermv -n).packages/cli/src/cli.ts: alignssessionpipe doctoroutput and next-step hints withreinstallacross standalone, Homebrew, leftover-npm, and broken-install states..changeset/reinstall-standalone-homebrew.md: patch changeset forsessionpipe.Verification
distby Opus 5.5 (PASSacross live standalone+0.18.6 npm cleanup, Homebrew Cellar symlink, outdated+leftover agreement, broken standalone recovery, and 16 launcher security/FIFO/ReDoS probes).npm run lint,npm run typecheck,npm run build,npm run schemas -- --check,npm run conformance, and full monoreponpm run test:coverage(4,948 tests, 100% Stmts / Branch / Funcs / Lines).