* removed duplicate calls to clean_xcode_tools and clean_code_editors
in lib/clean/app_caches.sh clean_user_gui_application() was making calls
to clean_xcode_tools and clean_code_editors.
in lib/clean/dev.sh clean_xcode_tools and clean_code_editors was also
being called, causing the duplication when executing the clean command.
removed the calls from lib/clean/app_caches.sh
clean_user_gui_application since these two calls are developer focused.
* test: cover removed developer app calls
---------
Co-authored-by: Tw93 <hitw93@gmail.com>
Replace jq with bash-native JSON parsing helpers (json_get_value,
json_validate, parse_optimization_items) so that mo optimize no
longer requires jq to be installed.
Closes#588
Scan Application Scripts, Containers and FileProvider directories for
entries that share the app bundle-id prefix (e.g. share extensions,
file-provider extensions) so they are included in uninstall cleanup.
Show "Bluetooth devices may disconnect briefly during refresh" before
actually restarting bluetoothd, so the user is not surprised by a
momentary disconnect.
Add a lightweight top-level entry cap to Containers and Group
Containers scanning. When a cache directory exceeds the threshold,
skip the expensive per-item du/find size scan and take a partial-size
/ "cleaned" output path instead. Replace find-piped-to-read loops
with pure-bash glob iteration to cut external process overhead.
Closes#586
Replace LastRecommendedUpdatesAvailable defaults check with unified
softwareupdate -l --no-scan parsing. Add caching layer and teach the
parser to distinguish macOS updates, Background Security Improvements,
Rapid Security Responses, and non-macOS entries so each gets an
accurate title in the output.
Fix reset_softwareupdate_cache() to also reset the in-memory
SOFTWARE_UPDATE_LIST_LOADED flag, and add a regression test.
Closes#585
Add MOLE_TEST_MODE=1 checks to skip AppleScript osascript calls
and sudo operations that trigger system permission dialogs during tests:
- lib/check/all.sh: Skip login items listing
- lib/clean/apps.sh: Skip running app detection
- lib/clean/user.sh: Skip Finder trash operations and sudo test calls
- lib/core/log.sh: Skip sudo status check in debug log
- lib/uninstall/batch.sh: Skip login item removal
Also add MOLE_TEST_MODE=1 export to all test files that load
these modules to ensure consistent test isolation.
Allow users to press 'q' or 'Q' to quit the Touch ID setup menu,
in addition to ESC key. This fixes the "Invalid key" error when
users press Q as suggested by the prompt.
Fixes#575
Before deleting .download/.crdownload/.part files, check lsof to
detect open file handles. Files held by an active browser process
are skipped with a warning instead of being deleted.
Fixes a case where a 12GB IPSW being downloaded in Safari was
removed mid-download because the .download bundle matched the glob.
.githooks/pre-commit runs bash syntax check, shfmt format check,
shellcheck, and go vet against staged files on every commit.
Catches the same issues as check.yml before they reach GitHub.
Also update CONTRIBUTING.md setup instructions to include
`git config core.hooksPath .githooks`.
Add hint_is_system_binary() to short-circuit detection for plists that
use /bin/*, /usr/bin/*, /usr/libexec/* etc. as their program path.
These are custom scripts, not app-backed launch agents, so the stale
detection logic does not apply. Previously the function relied on the
absence of AssociatedBundleIdentifiers as an implicit skip, which could
fail on certain macOS plutil edge cases.
Also add teardown() in clean_hints.bats to explicitly remove the
LaunchAgents directory after each test, and add run_with_timeout mock
in the "skips custom shell wrappers" test to prevent mdfind from
influencing results. This eliminates the intermittent failure where
test 70 showed "Review:" in output without "Potential stale login item:".
Add ~/Library/HTTPStorages/<bundle-id>.binarycookies to targeted uninstall
cleanup. WKWebView creates both a directory and a .binarycookies file under
HTTPStorages; only the directory was previously covered. Affected apps include
cmux (com.cmuxterm.app) and Tuna (com.brnbw.Tuna).
Also add ~/Library/Preferences/<bundle-id> directory detection for apps like
VLC (org.videolan.vlc) that store preferences in a directory rather than a
.plist file.