mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:04:42 +00:00
fix: show spinner during cleanup phase
Add progress indicator when deleting files to prevent the terminal from appearing frozen during long-running cleanup operations. Closes #358
This commit is contained in:
@@ -522,6 +522,10 @@ safe_clean() {
|
||||
fi
|
||||
|
||||
# Read results back in original order.
|
||||
# Start spinner for cleaning phase
|
||||
if [[ "$DRY_RUN" != "true" && ${#existing_paths[@]} -gt 0 && -t 1 ]]; then
|
||||
MOLE_SPINNER_PREFIX=" " start_inline_spinner "Cleaning..."
|
||||
fi
|
||||
idx=0
|
||||
if [[ ${#existing_paths[@]} -gt 0 ]]; then
|
||||
for path in "${existing_paths[@]}"; do
|
||||
@@ -558,6 +562,10 @@ safe_clean() {
|
||||
fi
|
||||
|
||||
else
|
||||
# Start spinner for cleaning phase (small batch)
|
||||
if [[ "$DRY_RUN" != "true" && ${#existing_paths[@]} -gt 0 && -t 1 ]]; then
|
||||
MOLE_SPINNER_PREFIX=" " start_inline_spinner "Cleaning..."
|
||||
fi
|
||||
local idx=0
|
||||
if [[ ${#existing_paths[@]} -gt 0 ]]; then
|
||||
for path in "${existing_paths[@]}"; do
|
||||
|
||||
Reference in New Issue
Block a user