From 3e47cdb39edea6287e21c32dd1e469537985ab46 Mon Sep 17 00:00:00 2001 From: tw93 Date: Thu, 26 Feb 2026 11:53:49 +0800 Subject: [PATCH] refactor(uninstall): use shared get_lsregister_path from base.sh Remove duplicate get_lsregister_path() implementation and use the shared utility from base.sh instead. --- lib/uninstall/batch.sh | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/uninstall/batch.sh b/lib/uninstall/batch.sh index a7a298a..fe7876f 100755 --- a/lib/uninstall/batch.sh +++ b/lib/uninstall/batch.sh @@ -11,22 +11,6 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" # Batch uninstall with a single confirmation. -get_lsregister_path() { - local -a candidates=( - "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister" - "/System/Library/CoreServices/Frameworks/LaunchServices.framework/Support/lsregister" - ) - local candidate="" - for candidate in "${candidates[@]}"; do - if [[ -x "$candidate" ]]; then - echo "$candidate" - return 0 - fi - done - echo "" - return 0 -} - # High-performance sensitive data detection (pure Bash, no subprocess) # Faster than grep for batch operations, especially when processing many apps has_sensitive_data() {