1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 20:50:06 +00:00

fix: temporarily disable pipefail to prevent process substitution failures during cleanup operations

This commit is contained in:
Tw93
2026-02-27 22:52:38 +08:00
parent a9433e4acd
commit 013549ad25
4 changed files with 58 additions and 0 deletions

View File

@@ -793,6 +793,12 @@ clean_application_support_logs() {
[[ "$total_apps" =~ ^[0-9]+$ ]] || total_apps=0
local last_progress_update
last_progress_update=$(get_epoch_seconds)
# Temporarily disable pipefail to prevent process substitution failures from interrupting the scan
local pipefail_was_set=false
if [[ -o pipefail ]]; then
pipefail_was_set=true
set +o pipefail
fi
for app_dir in ~/Library/Application\ Support/*; do
[[ -d "$app_dir" ]] || continue
local app_name
@@ -917,6 +923,10 @@ clean_application_support_logs() {
fi
done
done
# Restore pipefail if it was previously set
if [[ "$pipefail_was_set" == "true" ]]; then
set -o pipefail
fi
eval "$_ng_state"
stop_section_spinner
if [[ "$found_any" == "true" ]]; then