Commit Graph

5 Commits

Author SHA1 Message Date
Ben Younes efa35c34f2
fix: preserve combined statusline on uninstall (#550) 2026-07-09 11:48:37 +02:00
DietrichGebert 40e50d9e03
fix: don't crash uninstall on malformed settings.json (#481)
If settings.json contained invalid JSON, JSON.parse threw a SyntaxError, which
has no .code, so the catch rethrew it and crashed the script — after the mode
flag and config file were already removed, leaving cleanup half-done. Handle
SyntaxError explicitly: warn that the statusLine entry couldn't be removed and
leave the file untouched, since invalid JSON can't be safely edited. Adds a
regression test that a malformed settings.json exits 0, warns, and is left
byte-for-byte intact.

Closes #434

Co-authored-by: isaukywhite <50426537+isaukywhite@users.noreply.github.com>
2026-07-02 01:30:30 +02:00
DietrichGebert 25185a445a
fix: don't destroy combined statuslines on uninstall (#479)
uninstall deleted the whole statusLine key whenever the command contained
'ponytail-statusline'. For a user-combined statusline (e.g. caveman && ponytail)
that destroyed the other plugin's statusline too. Only remove the statusLine
when ponytail owns the whole command; if it's combined with other segments,
leave it and tell the user to strip ponytail's part by hand. Never leaves a
malformed husk. Adds a regression test for the combined case.

Closes #374

Co-authored-by: nanaubusiness <195150264+nanaubusiness@users.noreply.github.com>
2026-07-02 00:39:07 +02:00
DietrichGebert 6d5d75a4f1
docs: clarify uninstall run-order + statusLine ceiling (#278)
Follow-up to #228 (issue #226):

- README: state that scripts/uninstall.js must run *before* the host
  remove command, since the script is itself a plugin file and gets
  deleted by the removal (or run it from a separate clone).
- uninstall.js: add a ponytail: comment naming the statusLine match
  ceiling — substring match + whole-key delete removes a combined
  (e.g. caveman+ponytail) statusline wholesale; upgrade path noted.
- Add trailing newline to the file.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 23:46:40 +02:00
Isha katiyar ae24cd00bc
fix: add uninstall cleanup script for state outside plugin files (#226) (#228) 2026-06-23 23:38:06 +02:00