1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 16:49:41 +00:00

Merge branch 'dev' into dev

This commit is contained in:
Tw93
2026-01-14 10:18:21 +08:00
committed by GitHub
14 changed files with 890 additions and 244 deletions

View File

@@ -342,7 +342,11 @@ safe_clean() {
valid_targets+=("$target")
done
targets=("${valid_targets[@]}")
if [[ ${#valid_targets[@]} -gt 0 ]]; then
targets=("${valid_targets[@]}")
else
targets=()
fi
if [[ ${#targets[@]} -eq 0 ]]; then
return 0
fi

View File

@@ -130,15 +130,20 @@ perform_purge() {
# Show title on first line, spinner and scanning info on second line
if [[ -n "$display_path" ]]; then
printf '\r%s\n%s %sScanning %s\033[K\033[A' \
"${PURPLE_BOLD}Purge Project Artifacts${NC}" \
# Line 1: Move to start, clear, print title
printf '\r\033[K%s\n' "${PURPLE_BOLD}Purge Project Artifacts${NC}"
# Line 2: Move to start, clear, print scanning info
printf '\r\033[K%s %sScanning %s' \
"${BLUE}${spin_char}${NC}" \
"${GRAY}" "$display_path"
# Move up THEN to start (important order!)
printf '\033[A\r'
else
printf '\r%s\n%s %sScanning...\033[K\033[A' \
"${PURPLE_BOLD}Purge Project Artifacts${NC}" \
printf '\r\033[K%s\n' "${PURPLE_BOLD}Purge Project Artifacts${NC}"
printf '\r\033[K%s %sScanning...' \
"${BLUE}${spin_char}${NC}" \
"${GRAY}"
printf '\033[A\r'
fi
sleep 0.05