From 1169cbf198f6b45262332c7dd0f5b944f8e35d69 Mon Sep 17 00:00:00 2001 From: tw93 Date: Mon, 23 Feb 2026 08:15:47 +0800 Subject: [PATCH] fix(purge): avoid command find in fallback scan (#478) --- lib/clean/project.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/clean/project.sh b/lib/clean/project.sh index 0ed4a29..c637996 100644 --- a/lib/clean/project.sh +++ b/lib/clean/project.sh @@ -504,7 +504,9 @@ scan_purge_targets() { [[ $i -lt $((${#purge_targets[@]} - 1)) ]] && target_expr+=(-o) done - command find "$search_path" -mindepth "$min_depth" -maxdepth "$max_depth" -type d \ + # Use plain `find` here for compatibility with environments where + # `command find` behaves inconsistently in this complex expression. + find "$search_path" -mindepth "$min_depth" -maxdepth "$max_depth" -type d \ \( "${prune_expr[@]}" \) -prune -o \ \( "${target_expr[@]}" \) -print -prune \ 2> /dev/null > "$output_file.raw" || true