1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-07 20:54:21 +00:00

fix(uninstall): detect Maestro Studio .mobiledev and add regression test (#421)

This commit is contained in:
tw93
2026-02-07 10:44:10 +08:00
parent 500ab2f568
commit 5cdfcf2479
2 changed files with 14 additions and 0 deletions

View File

@@ -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

View File

@@ -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"