diff --git a/uninstall.sh b/uninstall.sh old mode 100644 new mode 100755 index b164db6..96a3338 --- a/uninstall.sh +++ b/uninstall.sh @@ -5,7 +5,6 @@ # Pipefall instead of error checks to retain original error set -euo pipefail -chmod +x uninstall.sh echo echo "#########################" echo @@ -14,13 +13,19 @@ echo echo "#########################" echo -# Config -REPO="srevinsaju/zap" - # Uninstallation echo [~] Uninstalling zap -rm $(which zap) -# Installation Complete +# Checks if zap is installed and get the path +ZAP_PATH=$(which zap || true) +if [[ -z "$ZAP_PATH" ]]; then + echo "[!] zap is not installed or not found in PATH." + exit 1 +fi + +# Remove the zap binary +rm "$ZAP_PATH" + +# Uninstallation Complete echo -echo [~] Uninstallation Complete.... +echo "[~] Uninstallation Complete...."