From 5cdfcf2479c51b4e9359cd912409751446b2fd68 Mon Sep 17 00:00:00 2001 From: tw93 Date: Sat, 7 Feb 2026 10:44:10 +0800 Subject: [PATCH] fix(uninstall): detect Maestro Studio .mobiledev and add regression test (#421) --- lib/core/app_protection.sh | 5 +++++ tests/uninstall_naming_variants.bats | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/lib/core/app_protection.sh b/lib/core/app_protection.sh index 63247d4..bb5fcde 100755 --- a/lib/core/app_protection.sh +++ b/lib/core/app_protection.sh @@ -1106,6 +1106,11 @@ find_app_files() { [[ "$bundle_id" =~ microsoft.*vscode ]] && [[ -d ~/.vscode ]] && files_to_clean+=("$HOME/.vscode") [[ "$app_name" =~ Docker ]] && [[ -d ~/.docker ]] && files_to_clean+=("$HOME/.docker") + # 6.1 Maestro Studio + if [[ "$bundle_id" == "com.maestro.studio" ]] || [[ "$lowercase_name" =~ maestro[[:space:]]*studio ]]; then + [[ -d ~/.mobiledev ]] && files_to_clean+=("$HOME/.mobiledev") + fi + # 7. Raycast if [[ "$bundle_id" == "com.raycast.macos" ]]; then # Standard user directories diff --git a/tests/uninstall_naming_variants.bats b/tests/uninstall_naming_variants.bats index 1b25560..9344dad 100644 --- a/tests/uninstall_naming_variants.bats +++ b/tests/uninstall_naming_variants.bats @@ -48,6 +48,15 @@ setup() { [[ "$result" =~ "Library/Application Support/MaestroStudio" ]] } +@test "find_app_files detects Maestro Studio auth directory (.mobiledev)" { + mkdir -p "$HOME/.mobiledev" + echo "token" > "$HOME/.mobiledev/authtoken" + + result=$(find_app_files "com.maestro.studio" "Maestro Studio") + + [[ "$result" =~ .mobiledev ]] +} + @test "find_app_files extracts base name from version suffix (Zed Nightly -> zed)" { mkdir -p "$HOME/.config/zed" mkdir -p "$HOME/Library/Application Support/Zed"