Update Fleet-maintained apps - #46418
Conversation
Generated automatically with cmd/maintained-apps.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Script Diff Resultsee/maintained-apps/outputs/aws-cli/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/brave-browser/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/claude/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/dialpad/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/dropbox/windows.json=== Install Script (no changes) ===
=== Uninstall // d941db84 -> 9bebe5c6 ===
--- /tmp/old.wMU2Jk 2026-05-29 02:35:52.973940408 +0000
+++ /tmp/new.cGROjZ 2026-05-29 02:35:52.973940408 +0000
@@ -1,4 +1,4 @@
-$product_code = '{4FACD0F4-1AE8-5B27-9912-CCF9EFF75582}'
+$product_code = '{7113B28E-75FC-50C6-98DE-854CAD48372B}'
$timeoutSeconds = 300 # 5 minute timeout
# Fleet uninstalls app using product code that's extracted on uploadee/maintained-apps/outputs/figma/darwin.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/lastpass/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/microsoft-edge/darwin.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/notion-calendar/darwin.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/parallels/darwin.json=== Install Script (no changes) ===
=== Uninstall // 9c10ac4b -> 038b4616 ===
--- /tmp/old.nG6bbL 2026-05-29 02:35:53.169940695 +0000
+++ /tmp/new.L5k9qt 2026-05-29 02:35:53.170940697 +0000
@@ -72,6 +72,7 @@
sudo rm -rf '/usr/local/bin/prl_convert'
sudo rm -rf '/usr/local/bin/prl_disk_tool'
sudo rm -rf '/usr/local/bin/prl_perf_ctl'
+sudo rm -rf '/usr/local/bin/prlcopy'
sudo rm -rf '/usr/local/bin/prlcore2dmp'
sudo rm -rf '/usr/local/bin/prlctl'
sudo rm -rf '/usr/local/bin/prlexec'ee/maintained-apps/outputs/tailscale/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/zed/darwin.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) === |
WalkthroughThis PR updates the maintained-apps manifests for 11 applications across Windows and macOS platforms. Most changes follow the same pattern: version number bump, updated installer URL, new SHA-256 checksum, and refreshed version comparison queries. AWS CLI also modifies its install script to add elevated privilege execution and explicit wait handling. Dropbox and Parallels introduce new uninstall script references with updated product codes and implementation logic. Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ee/maintained-apps/outputs/parallels/darwin.json`:
- Line 19: The generated uninstall script quotes leading tildes and glob
patterns so they never expand: change the uninstaller generator so it emits
rmdir arguments without single-quoting a leading ~ (stop using patterns like
sb.Writef("sudo rmdir '%s'", dir) when dir begins with ~) and update the
generated trash() usage so globs are expanded before existence/move checks
(either generate unquoted/glob-friendly arguments or have trash() perform proper
glob expansion/evaluation before [[ -e "$target_file" ]] and mv -f). Locate the
emit site that formats "sudo rmdir '%s'" and the code that emits trash
invocations with quoted patterns and update them to allow shell expansion of ~
and * (or implement safe eval/glob handling inside the trash function).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ab32414e-3914-4e27-abae-272909103ace
📒 Files selected for processing (12)
ee/maintained-apps/outputs/aws-cli/windows.jsonee/maintained-apps/outputs/brave-browser/windows.jsonee/maintained-apps/outputs/claude/windows.jsonee/maintained-apps/outputs/dialpad/windows.jsonee/maintained-apps/outputs/dropbox/windows.jsonee/maintained-apps/outputs/figma/darwin.jsonee/maintained-apps/outputs/lastpass/windows.jsonee/maintained-apps/outputs/microsoft-edge/darwin.jsonee/maintained-apps/outputs/notion-calendar/darwin.jsonee/maintained-apps/outputs/parallels/darwin.jsonee/maintained-apps/outputs/tailscale/windows.jsonee/maintained-apps/outputs/zed/darwin.json
| "refs": { | ||
| "1142d1f5": "#!/bin/bash\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath \"$INSTALLER_PATH\")\")\n# functions\n\nquit_and_track_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local timeout_duration=10\n\n # check if the application is running\n local app_running\n app_running=$(osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null)\n if [[ \"$app_running\" != \"true\" ]]; then\n eval \"export $var_name=0\"\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n eval \"export $var_name=0\"\n return\n fi\n\n # App was running, mark it for relaunch\n eval \"export $var_name=1\"\n echo \"Application '$bundle_id' was running; will relaunch after installation.\"\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n\nrelaunch_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local was_running\n\n # Check if the app was running before installation\n eval \"was_running=\\$$var_name\"\n if [[ \"$was_running\" != \"1\" ]]; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; then\n echo \"Not logged into a non-root GUI; skipping relaunching application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Relaunching application '$bundle_id'...\"\n\n # Launch the app in the logged-in user's GUI session. Apps launched by root\n # won't register with the user's Dock/GUI, so run 'open' as the console user.\n # Use 'launchctl asuser' to bootstrap into the console user's Mach namespace\n # and GUI session — 'sudo -u' alone doesn't do this, which can cause\n # LSOpenURLsWithRole() failures even when 'open' exits 0.\n local open_status=0\n if [[ $EUID -eq 0 ]]; then\n local console_uid\n console_uid=$(id -u \"$console_user\")\n /bin/launchctl asuser \"$console_uid\" sudo -u \"$console_user\" open -b \"$bundle_id\" >/dev/null 2>&1 || open_status=$?\n else\n open -b \"$bundle_id\" >/dev/null 2>&1 || open_status=$?\n fi\n\n if [[ $open_status -eq 0 ]]; then\n echo \"Application '$bundle_id' relaunched successfully.\"\n else\n echo \"Failed to relaunch application '$bundle_id'.\"\n fi\n}\n\n\n# extract contents\nMOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)\nhdiutil attach -plist -nobrowse -readonly -mountpoint \"$MOUNT_POINT\" \"$INSTALLER_PATH\"\nsudo cp -R \"$MOUNT_POINT\"/* \"$TMPDIR\"\nhdiutil detach \"$MOUNT_POINT\"\n# copy to the applications folder\nquit_and_track_application 'com.parallels.desktop.console'\nif [ -d \"$APPDIR/Parallels Desktop.app\" ]; then\n\tsudo mv \"$APPDIR/Parallels Desktop.app\" \"$TMPDIR/Parallels Desktop.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Parallels Desktop.app\" \"$APPDIR\"\nrelaunch_application 'com.parallels.desktop.console'\n", | ||
| "9c10ac4b": "#!/bin/bash\n\n# variables\nAPPDIR=\"/Applications/\"\nLOGGED_IN_USER=$(scutil <<< \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\n# functions\n\nsend_signal() {\n local signal=\"$1\"\n local bundle_id=\"$2\"\n local logged_in_user=\"$3\"\n local logged_in_uid pids\n\n if [ -z \"$signal\" ] || [ -z \"$bundle_id\" ] || [ -z \"$logged_in_user\" ]; then\n echo \"Usage: uninstall_signal <signal> <bundle_id> <logged_in_user>\"\n return 1\n fi\n\n logged_in_uid=$(id -u \"$logged_in_user\")\n if [ -z \"$logged_in_uid\" ]; then\n echo \"Could not find UID for user '$logged_in_user'.\"\n return 1\n fi\n\n echo \"Signalling '$signal' to application ID '$bundle_id' for user '$logged_in_user'\"\n\n pids=$(/bin/launchctl asuser \"$logged_in_uid\" sudo -iu \"$logged_in_user\" /bin/launchctl list | awk -v bundle_id=\"$bundle_id\" '\n $3 ~ bundle_id { print $1 }')\n\n if [ -z \"$pids\" ]; then\n echo \"No processes found for bundle ID '$bundle_id'.\"\n return 0\n fi\n\n echo \"Unix PIDs are $pids for processes with bundle identifier $bundle_id\"\n for pid in $pids; do\n if kill -s \"$signal\" \"$pid\" 2>/dev/null; then\n echo \"Successfully signaled PID $pid with signal $signal.\"\n else\n echo \"Failed to kill PID $pid with signal $signal. Check permissions.\"\n fi\n done\n\n sleep 3\n}\n\ntrash() {\n local logged_in_user=\"$1\"\n local target_file=\"$2\"\n local timestamp=\"$(date +%Y-%m-%d-%s)\"\n local rand=\"$(jot -r 1 0 99999)\"\n\n # replace ~ with /Users/$logged_in_user\n if [[ \"$target_file\" == ~* ]]; then\n target_file=\"/Users/$logged_in_user${target_file:1}\"\n fi\n\n local trash=\"/Users/$logged_in_user/.Trash\"\n local file_name=\"$(basename \"${target_file}\")\"\n\n if [[ -e \"$target_file\" ]]; then\n echo \"removing $target_file.\"\n mv -f \"$target_file\" \"$trash/${file_name}_${timestamp}_${rand}\"\n else\n echo \"$target_file doesn't exist.\"\n fi\n}\n\nsend_signal 'TERM' 'com.parallels.desktop.console' \"$LOGGED_IN_USER\"\n(cd /Users/$LOGGED_IN_USER && '/usr/bin/pkill' '-TERM' 'prl_client_app') || true\nsudo rm -rf '/Library/Preferences/Parallels'\nsudo rm -rf '/usr/local/bin/prl_convert'\nsudo rm -rf '/usr/local/bin/prl_disk_tool'\nsudo rm -rf '/usr/local/bin/prl_perf_ctl'\nsudo rm -rf '/usr/local/bin/prlcore2dmp'\nsudo rm -rf '/usr/local/bin/prlctl'\nsudo rm -rf '/usr/local/bin/prlexec'\nsudo rm -rf '/usr/local/bin/prlsrvctl'\nsudo rm -rf \"$APPDIR/Parallels Desktop.app\"\nsudo rmdir '/Users/Shared/Parallels'\nsudo rmdir '~/Library/Caches/Parallels Software'\nsudo rmdir '~/Library/Parallels'\nsudo rmdir '~/Parallels'\ntrash $LOGGED_IN_USER '~/.parallels_settings'\ntrash $LOGGED_IN_USER '~/Applications (Parallels)'\ntrash $LOGGED_IN_USER '~/Library/Application Scripts/*.com.parallels.Desktop'\ntrash $LOGGED_IN_USER '~/Library/Application Scripts/com.parallels.desktop*'\ntrash $LOGGED_IN_USER '~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.parallels.desktop.console.sfl*'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.apple.helpd/Generated/com.parallels.desktop.console.help*'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.parallels.desktop.console'\ntrash $LOGGED_IN_USER '~/Library/Caches/Parallels Software/Parallels Desktop'\ntrash $LOGGED_IN_USER '~/Library/Containers/com.parallels.desktop*'\ntrash $LOGGED_IN_USER '~/Library/Group Containers/*.com.parallels.Desktop'\ntrash $LOGGED_IN_USER '~/Library/Logs/parallels.log'\ntrash $LOGGED_IN_USER '~/Library/Parallels/Applications Menus'\ntrash $LOGGED_IN_USER '~/Library/Parallels/Downloads'\ntrash $LOGGED_IN_USER '~/Library/Parallels/Parallels Desktop'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.desktop.console.LSSharedFileList.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.desktop.console.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.Parallels Desktop Events.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.Parallels Desktop Statistics.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.Parallels Desktop.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.Parallels.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.PDInfo.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/Parallels'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/com.parallels.desktop.console.savedState'\n" | ||
| "038b4616": "#!/bin/bash\n\n# variables\nAPPDIR=\"/Applications/\"\nLOGGED_IN_USER=$(scutil <<< \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\n# functions\n\nsend_signal() {\n local signal=\"$1\"\n local bundle_id=\"$2\"\n local logged_in_user=\"$3\"\n local logged_in_uid pids\n\n if [ -z \"$signal\" ] || [ -z \"$bundle_id\" ] || [ -z \"$logged_in_user\" ]; then\n echo \"Usage: uninstall_signal <signal> <bundle_id> <logged_in_user>\"\n return 1\n fi\n\n logged_in_uid=$(id -u \"$logged_in_user\")\n if [ -z \"$logged_in_uid\" ]; then\n echo \"Could not find UID for user '$logged_in_user'.\"\n return 1\n fi\n\n echo \"Signalling '$signal' to application ID '$bundle_id' for user '$logged_in_user'\"\n\n pids=$(/bin/launchctl asuser \"$logged_in_uid\" sudo -iu \"$logged_in_user\" /bin/launchctl list | awk -v bundle_id=\"$bundle_id\" '\n $3 ~ bundle_id { print $1 }')\n\n if [ -z \"$pids\" ]; then\n echo \"No processes found for bundle ID '$bundle_id'.\"\n return 0\n fi\n\n echo \"Unix PIDs are $pids for processes with bundle identifier $bundle_id\"\n for pid in $pids; do\n if kill -s \"$signal\" \"$pid\" 2>/dev/null; then\n echo \"Successfully signaled PID $pid with signal $signal.\"\n else\n echo \"Failed to kill PID $pid with signal $signal. Check permissions.\"\n fi\n done\n\n sleep 3\n}\n\ntrash() {\n local logged_in_user=\"$1\"\n local target_file=\"$2\"\n local timestamp=\"$(date +%Y-%m-%d-%s)\"\n local rand=\"$(jot -r 1 0 99999)\"\n\n # replace ~ with /Users/$logged_in_user\n if [[ \"$target_file\" == ~* ]]; then\n target_file=\"/Users/$logged_in_user${target_file:1}\"\n fi\n\n local trash=\"/Users/$logged_in_user/.Trash\"\n local file_name=\"$(basename \"${target_file}\")\"\n\n if [[ -e \"$target_file\" ]]; then\n echo \"removing $target_file.\"\n mv -f \"$target_file\" \"$trash/${file_name}_${timestamp}_${rand}\"\n else\n echo \"$target_file doesn't exist.\"\n fi\n}\n\nsend_signal 'TERM' 'com.parallels.desktop.console' \"$LOGGED_IN_USER\"\n(cd /Users/$LOGGED_IN_USER && '/usr/bin/pkill' '-TERM' 'prl_client_app') || true\nsudo rm -rf '/Library/Preferences/Parallels'\nsudo rm -rf '/usr/local/bin/prl_convert'\nsudo rm -rf '/usr/local/bin/prl_disk_tool'\nsudo rm -rf '/usr/local/bin/prl_perf_ctl'\nsudo rm -rf '/usr/local/bin/prlcopy'\nsudo rm -rf '/usr/local/bin/prlcore2dmp'\nsudo rm -rf '/usr/local/bin/prlctl'\nsudo rm -rf '/usr/local/bin/prlexec'\nsudo rm -rf '/usr/local/bin/prlsrvctl'\nsudo rm -rf \"$APPDIR/Parallels Desktop.app\"\nsudo rmdir '/Users/Shared/Parallels'\nsudo rmdir '~/Library/Caches/Parallels Software'\nsudo rmdir '~/Library/Parallels'\nsudo rmdir '~/Parallels'\ntrash $LOGGED_IN_USER '~/.parallels_settings'\ntrash $LOGGED_IN_USER '~/Applications (Parallels)'\ntrash $LOGGED_IN_USER '~/Library/Application Scripts/*.com.parallels.Desktop'\ntrash $LOGGED_IN_USER '~/Library/Application Scripts/com.parallels.desktop*'\ntrash $LOGGED_IN_USER '~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.parallels.desktop.console.sfl*'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.apple.helpd/Generated/com.parallels.desktop.console.help*'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.parallels.desktop.console'\ntrash $LOGGED_IN_USER '~/Library/Caches/Parallels Software/Parallels Desktop'\ntrash $LOGGED_IN_USER '~/Library/Containers/com.parallels.desktop*'\ntrash $LOGGED_IN_USER '~/Library/Group Containers/*.com.parallels.Desktop'\ntrash $LOGGED_IN_USER '~/Library/Logs/parallels.log'\ntrash $LOGGED_IN_USER '~/Library/Parallels/Applications Menus'\ntrash $LOGGED_IN_USER '~/Library/Parallels/Downloads'\ntrash $LOGGED_IN_USER '~/Library/Parallels/Parallels Desktop'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.desktop.console.LSSharedFileList.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.desktop.console.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.Parallels Desktop Events.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.Parallels Desktop Statistics.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.Parallels Desktop.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.Parallels.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.parallels.PDInfo.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/Parallels'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/com.parallels.desktop.console.savedState'\n", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# 1) Single-quoted tilde under rmdir/rm in generated uninstall scripts
echo "=== single-quoted tilde rmdir/rm ==="
rg -nP "rmdir '~|rm -rf '~" | head -50
echo "=== globbed trash targets ==="
# trash calls whose quoted target contains a wildcard
rg -nP "trash \\\$LOGGED_IN_USER '[^']*\*" | head -50Repository: fleetdm/fleet
Length of output: 50370
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== source occurrences of trash() implementation (excluding generated outputs) ==="
rg -n --hidden --no-ignore -S "trash\(\)\s*\{" ee/maintained-apps | head -50
echo "=== source occurrences of '~' expansion comment in trash() (excluding generated outputs) ==="
rg -n --hidden --no-ignore -S "replace ~ with /Users/\$logged_in_user" ee/maintained-apps | head -50
echo "=== source occurrences of single-quoted tilde under sudo rmdir (excluding generated outputs) ==="
rg -n --hidden --no-ignore -S "sudo rmdir '~/" ee/maintained-apps | head -50
echo "=== source occurrences of the pattern in generator (excluding generated outputs) ==="
rg -n --hidden --no-ignore -S "rmdir '~" ee/maintained-apps | head -50Repository: fleetdm/fleet
Length of output: 50370
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# List likely non-generated template locations
echo "=== top-level maintained-apps contents ==="
ls -1 ee/maintained-apps | head -50
# Search for the problematic rmdir pattern in non-output files
echo "=== non-output: single-quoted tilde under sudo rmdir ==="
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' "sudo rmdir '~/" ee/maintained-apps | head -50 || true
echo "=== non-output: quoted tilde comments in trash() ==="
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' "replace ~ with /Users/\$logged_in_user" ee/maintained-apps | head -50 || true
echo "=== non-output: trash call with wildcard patterns ==="
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' "trash .* '~[^']*\*'" ee/maintained-apps | head -50 || true
# Also include the migration test that referenced these strings (often golden templates)
echo "=== non-output: UpdateFMAInstallScripts_test occurrences ==="
rg -n "UpdateFMAInstallScripts" ee/maintained-apps ee/server/datastore/mysql/migrations -S || trueRepository: fleetdm/fleet
Length of output: 2596
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== server/mdm/maintainedapps/testdata/scripts: sudo rmdir with single-quoted tilde ==="
rg -n "sudo rmdir '~/" server/mdm/maintainedapps/testdata/scripts | head -100
echo "=== server/mdm/maintainedapps/testdata/scripts: trash calls with wildcard targets ==="
rg -n "trash \$LOGGED_IN_USER '.*\*'" server/mdm/maintainedapps/testdata/scripts | head -100
echo "=== server/mdm/maintainedapps/testdata/scripts: trash() definition ==="
rg -n "^[[:space:]]*trash\(\)\s*\{" -S server/mdm/maintainedapps/testdata/scripts | head -50
echo "=== locate trash() implementation in server/mdm/maintainedapps (anywhere) ==="
rg -n "trash\(\)\s*\{" -S server/mdm/maintainedapps | head -50
echo "=== ee/maintained-apps: sudo rmdir with single-quoted tilde ==="
rg -n "sudo rmdir '~/" ee/maintained-apps | head -100
echo "=== ee/maintained-apps inputs scripts: trash calls with wildcard targets ==="
rg -n "trash \$LOGGED_IN_USER '.*\*'" ee/maintained-apps/inputs | head -100Repository: fleetdm/fleet
Length of output: 1575
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== find trash() definitions in golden scripts ==="
rg -n --hidden --no-ignore -S "^[[:space:]]*trash\(\)\s*\{" server/mdm/maintainedapps/testdata/scripts | head -50
echo "=== show trash() + one wildcarded trash call in microsoft-teams golden (if present) ==="
f="server/mdm/maintainedapps/testdata/scripts/microsoft-teams_uninstall.golden.sh"
if [ -f "$f" ]; then
wc -l "$f"
echo "--- grep wildcarded trash calls ---"
rg -n "trash \$LOGGED_IN_USER '.*\*'" "$f" || true
echo "--- show trash() definition region (first 60 lines around function) ---"
line=$(rg -n "^[[:space:]]*trash\(\)\s*\{" "$f" | head -1 | cut -d: -f1 || true)
if [ -n "${line:-}" ]; then
start=$((line-5)); end=$((line+70))
sed -n "${start},${end}p" "$f" | cat -n
fi
fi
echo "=== show how rmdir '~/' lines are expressed in the golden parallels-uninstall template (if present) ==="
# parallels golden might be under different filename; search within testdata scripts
rg -n "sudo rmdir '~/" server/mdm/maintainedapps/testdata/scripts | head -50Repository: fleetdm/fleet
Length of output: 6689
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== locate trash() implementation template source string ==="
rg -n --hidden --no-ignore --glob '!**/outputs/**' --glob '!**/testdata/**' "replace ~ with /Users/\$logged_in_user" server ee || true
echo "=== locate sudo rmdir '~/' template source ==="
rg -n --hidden --no-ignore --glob '!**/outputs/**' --glob '!**/testdata/**' "sudo rmdir '~/" server ee || true
echo "=== locate trash() existence-check pattern in non-testdata/non-outputs code ==="
rg -n --hidden --no-ignore --glob '!**/outputs/**' --glob '!**/testdata/**' 'if \[\[ -e "\$target_file" \]\]' server ee || true
echo "=== locate homebrew input scripts wildcard trash usage (context) ==="
rg -n "trash \$LOGGED_IN_USER '.*\*'" ee/maintained-apps/inputs/homebrew/scripts | head -20Repository: fleetdm/fleet
Length of output: 1250
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# 1) Find the actual code/template that defines trash() logic (not in generated outputs)
echo "=== find trash() implementation snippet in code (exclude outputs/testdata) ==="
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' --glob '!server/mdm/maintainedapps/testdata/**' --glob '!**/testdata/**' "target_file:1" ee server || true
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' --glob '!server/mdm/maintainedapps/testdata/**' --glob '!**/testdata/**' "local trash=\"/Users/\$logged_in_user/.Trash\"" ee server || true
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' --glob '!server/mdm/maintainedapps/testdata/**' --glob '!**/testdata/**' "if \[\[ -e \"\\\$target_file\" \]\]; then" ee server || true
# 2) Inspect the file that already showed the if [[ -e "$target_file" ]] check
echo "=== show surrounding lines for: ee/maintained-apps/ingesters/homebrew/scripts.go (match near 685) ==="
f="ee/maintained-apps/ingesters/homebrew/scripts.go"
if [ -f "$f" ]; then
nl -ba "$f" | sed -n '650,760p'
fi
# 3) Find any template/generator producing sudo rmdir '~/' (exclude testdata/outputs)
echo "=== find generator/template that emits \"sudo rmdir '~/'\" (exclude testdata/outputs) ==="
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' --glob '!server/mdm/maintainedapps/testdata/**' --glob '!**/testdata/**' "sudo rmdir '~/" ee server || trueRepository: fleetdm/fleet
Length of output: 1570
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== ee/maintained-apps/ingesters/homebrew/scripts.go: trash() implementation excerpt ==="
# use sed since nl isn't available
f="ee/maintained-apps/ingesters/homebrew/scripts.go"
# show likely region around the earlier matches (~line 679)
sed -n '640,730p' "$f" | cat -n
echo "=== locate wildcarded trash() calls in homebrew input scripts (small sample) ==="
rg -n "trash \$LOGGED_IN_USER '.*\*'" ee/maintained-apps/inputs/homebrew/scripts | head -20
echo "=== locate sudo rmdir '~/' generation code (exclude testdata/outputs) ==="
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' --glob '!server/mdm/maintainedapps/testdata/**' --glob '!**/testdata/**' --glob '!**/outputs/**' "sudo rmdir '~/" ee server || true
echo "=== locate rmdir '~/' strings outside golden/testdata ==="
rg -n --hidden --no-ignore --glob '!ee/maintained-apps/outputs/**' --glob '!server/mdm/maintainedapps/testdata/**' --glob '!**/testdata/**' --glob '!**/outputs/**' "rmdir '~/" ee server || trueRepository: fleetdm/fleet
Length of output: 3775
🏁 Script executed:
#!/bin/bash
set -euo pipefail
f="ee/maintained-apps/ingesters/homebrew/scripts.go"
echo "=== rmdir/~ patterns in $f ==="
rg -n "rmdir '\~|sudo rmdir '\~|rmdir '~|sudo rmdir '~|rmdir '~/" "$f" || true
echo "=== any rmdir occurrences in $f ==="
rg -n "rmdir " "$f" || true
echo "=== any sudo rmdir occurrences in maintained-apps ingesters ==="
rg -n --hidden --no-ignore "sudo rmdir '~/" ee/maintained-apps/ingesters || trueRepository: fleetdm/fleet
Length of output: 439
🏁 Script executed:
#!/bin/bash
set -euo pipefail
f="ee/maintained-apps/ingesters/homebrew/scripts.go"
# show around the sb.Writef("sudo rmdir '%s'", dir) occurrence
sed -n '280,340p' "$f" | cat -nRepository: fleetdm/fleet
Length of output: 2047
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== find parallels uninstall input definitions ==="
rg -n --hidden --no-ignore "parallels" ee/maintained-apps/inputs/homebrew -S || true
echo "=== list parallels-related input files (names) ==="
fd -i -t f "parallels" ee/maintained-apps/inputs/homebrew | head -50
echo "=== find u.RmDir / u.Trash usage for parallels in code ==="
rg -n "parallels" ee/maintained-apps/ingesters/homebrew -S || true
echo "=== find in generated parallels output the exact rmdir lines ==="
rg -n "rmdir '~" ee/maintained-apps/outputs/parallels/darwin.json || trueRepository: fleetdm/fleet
Length of output: 5944
Fix uninstall-script cleanup: single-quoted ~ in sudo rmdir and globbed trash() targets not being expanded
In ee/maintained-apps/outputs/parallels/darwin.json, these lines won’t remove user leftovers as intended:
sudo rmdir '~/Library/Caches/Parallels Software'/sudo rmdir '~/Library/Parallels'/sudo rmdir '~/Parallels':RmDiris generated assb.Writef("sudo rmdir '%s'", dir)(tilde is inside single quotes), so~never resolves to the logged-in user’s home.trash $LOGGED_IN_USER '.../*.com.parallels.Desktop'(and other*globs):trash()expands a leading~, but the existence check/removal uses[[ -e "$target_file" ]]andmv -f "$target_file" ...with the wildcard still quoted, so wildcard paths are never matched and are skipped.
This is coming from the shared homebrew uninstall script builder (ee/maintained-apps/ingesters/homebrew/scripts.go) and the golden scripts, so the fix should be made upstream there, not per generated darwin.json.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ee/maintained-apps/outputs/parallels/darwin.json` at line 19, The generated
uninstall script quotes leading tildes and glob patterns so they never expand:
change the uninstaller generator so it emits rmdir arguments without
single-quoting a leading ~ (stop using patterns like sb.Writef("sudo rmdir
'%s'", dir) when dir begins with ~) and update the generated trash() usage so
globs are expanded before existence/move checks (either generate
unquoted/glob-friendly arguments or have trash() perform proper glob
expansion/evaluation before [[ -e "$target_file" ]] and mv -f). Locate the emit
site that formats "sudo rmdir '%s'" and the code that emits trash invocations
with quoted patterns and update them to allow shell expansion of ~ and * (or
implement safe eval/glob handling inside the trash function).
Automated ingestion of latest Fleet-maintained app data.
Summary by CodeRabbit