Commit graph

1 commit

Author SHA1 Message Date
Zander
3e8d3fdcde
feat: add dedicated uninstall.sh script (#45)
* feat: add dedicated uninstall.sh script

Add a standalone uninstall script that provides:
- Safety confirmation prompt before removal (skip with -y/--yes)
- Installation check to verify Ralph is installed
- Removal plan display showing exactly what will be removed
- Consistent styling matching install.sh (colors, logging)
- Help option (-h/--help) for usage information
- Preserves project directories created with ralph-setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: add function documentation to uninstall.sh

Address CodeRabbit review comments:
- Add documentation comments to all functions (log, check_installation,
  show_removal_plan, confirm_uninstall, remove_commands, remove_ralph_home, main)
- Improve check_installation to detect partial installations by checking
  all Ralph commands, not just the main ralph command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: use safe arithmetic to avoid set -e failure

Replace ((removed++)) with removed=$((removed + 1)) to prevent
script termination when removed is 0, as post-increment returns
exit code 1 when the expression value is 0 under set -e.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 20:46:57 -07:00