Skip to content

fix: silent exit on permission denied during App State Cleanup (#438)#440

Merged
tw93 merged 1 commit intotw93:mainfrom
spider-yamet:fix/silent-exit-on-permission-denied
Feb 11, 2026
Merged

fix: silent exit on permission denied during App State Cleanup (#438)#440
tw93 merged 1 commit intotw93:mainfrom
spider-yamet:fix/silent-exit-on-permission-denied

Conversation

@spider-yamet
Copy link
Contributor

Fixes #438

Problem

mo optimize exits with code 1 during "App State Cleanup" when it hits a .savedState directory that needs Full Disk Access (e.g. net.maxon.appinstaller.savedState). With set -euo pipefail, the failing safe_remove stops the script instead of skipping the protected directory.

Solution

Add || true after safe_remove calls in opt_saved_state_cleanup and opt_cache_refresh, matching the Pipefail Safety pattern in CONTRIBUTING.md:

All commands that might fail must be handled

find /nonexistent -name "*.cache" 2>/dev/null || true

@tw93 tw93 merged commit 4289338 into tw93:main Feb 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] optimize: silent exit on permission denied during App State Cleanup

2 participants