SIGN IN SIGN UP

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>
D
DietrichGebert committed
40e50d9e03242aa5dd53ac771950f9127362b25f
Parent: b8f20b8
Committed by GitHub <noreply@github.com> on 7/1/2026, 11:30:30 PM