feat: Unified Uninstallation and Rollback

- Removed `BOOTSTRAP_PACKAGES_DIR`
b rb <tool> can now uninstall that particular tool
This commit is contained in:
2026-06-27 00:20:56 +05:30
parent 0c16640593
commit cee345e3f0
2 changed files with 46 additions and 9 deletions

View File

@@ -275,7 +275,12 @@ for script in "${SCRIPTS[@]}"; do
if [ -z "$target" ]; then
rollback_bare
else
rollback_to_savepoint "$target"
local registry_file="$BOOTSTRAP_STATE_DIR/registry.json"
if [ -f "$registry_file" ] && jq -e --arg t "$target" '.tools | has($t)' "$registry_file" >/dev/null; then
uninstall_tool "$target"
else
rollback_to_savepoint "$target"
fi
fi
exit 0
;;