From e803c463042c888a4cf270d0e61c6d695a0e63a8 Mon Sep 17 00:00:00 2001 From: tw93 Date: Mon, 26 Jan 2026 10:44:36 +0800 Subject: [PATCH] style: unify DRY_RUN variable check in trash cleanup --- lib/clean/user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/clean/user.sh b/lib/clean/user.sh index 3293841..cbbfa20 100644 --- a/lib/clean/user.sh +++ b/lib/clean/user.sh @@ -13,7 +13,7 @@ clean_user_essentials() { trash_count=$(osascript -e 'tell application "Finder" to count items in trash' 2> /dev/null || echo "0") [[ "$trash_count" =~ ^[0-9]+$ ]] || trash_count="0" - if [[ "${DRY_RUN:-false}" == "true" ]]; then + if [[ "$DRY_RUN" == "true" ]]; then [[ $trash_count -gt 0 ]] && echo -e " ${YELLOW}${ICON_DRY_RUN}${NC} Trash · would empty ($trash_count items)" || echo -e " ${GRAY}${ICON_EMPTY}${NC} Trash · already empty" elif [[ $trash_count -gt 0 ]]; then if osascript -e 'tell application "Finder" to empty trash' > /dev/null 2>&1; then