diff --git a/scripts/run/cursor_mac_free_trial_reset.sh b/scripts/run/cursor_mac_free_trial_reset.sh index cd7f8f7..13f2a5b 100644 --- a/scripts/run/cursor_mac_free_trial_reset.sh +++ b/scripts/run/cursor_mac_free_trial_reset.sh @@ -1161,7 +1161,8 @@ fix_damaged_app() { fi log_info "尝试移除隔离属性..." - if sudo xattr -rd com.apple.quarantine "$CURSOR_APP_PATH" 2>/dev/null; then + if sudo find "$CURSOR_APP_PATH" -print0 \ + | xargs -0 sudo xattr -d com.apple.quarantine 2>/dev/null log_info "成功移除隔离属性" else log_warn "移除隔离属性失败,尝试其他方法..." diff --git a/scripts/run/cursor_mac_id_modifier.sh b/scripts/run/cursor_mac_id_modifier.sh index 0d9001c..171f10b 100644 --- a/scripts/run/cursor_mac_id_modifier.sh +++ b/scripts/run/cursor_mac_id_modifier.sh @@ -2734,7 +2734,9 @@ fix_damaged_app() { fi log_info "尝试移除隔离属性..." - if sudo xattr -rd com.apple.quarantine "$CURSOR_APP_PATH" 2>/dev/null; then + if sudo find "$CURSOR_APP_PATH" -print0 \ + | xargs -0 sudo xattr -d com.apple.quarantine 2>/dev/null + then log_info "成功移除隔离属性" else log_warn "移除隔离属性失败,尝试其他方法..."