1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-17 14:23:54 +00:00

fix(clean): use sudo-safe cleanup for Xcode documentation cache

This commit is contained in:
tw93
2026-02-15 07:52:43 +08:00
parent 7d193526c3
commit 744ecec4ba
5 changed files with 102 additions and 8 deletions

View File

@@ -77,6 +77,8 @@ touch "$TMP_DIAG/MyApp_2025-02-10-120000_host.ips"
touch "$TMP_DIAG/MyApp.crash"
touch "$TMP_DIAG/MyApp_2025-02-10-120001_host.spin"
touch "$TMP_DIAG/OtherApp_2025-02-10.ips"
touch "$TMP_DIAG/MyAppPro_2025-02-10-120002_host.ips"
touch "$TMP_DIAG/MyAppPro.crash"
touch "$TMP_DIAG/MyApp_log.txt"
out=$(get_diagnostic_report_paths_for_app "$TMP_APP" "My App" "$TMP_DIAG" 2> /dev/null || true)
@@ -92,6 +94,13 @@ else
echo " OK does not return OtherApp"
((PASSED++))
fi
if [[ "$out" == *"MyAppPro"* ]]; then
echo " FAIL should not return MyAppPro (prefix collision)"
((FAILED++))
else
echo " OK does not return MyAppPro"
((PASSED++))
fi
if [[ "$out" == *"MyApp_log.txt"* ]]; then
echo " FAIL should not return non-diagnostic extension"
((FAILED++))