fix(clean): remove library from ALLOWED_DIRS and sandbox-safe rmSync fallback#5
Open
jestersimpps wants to merge 1 commit intomainfrom
Open
fix(clean): remove library from ALLOWED_DIRS and sandbox-safe rmSync fallback#5jestersimpps wants to merge 1 commit intomainfrom
jestersimpps wants to merge 1 commit intomainfrom
Conversation
…fallback - Remove 'library' from ALLOWED_DIRS — it was silently whitelisted, never flagged - Remove .cache from TEMP_DOTDIRS so it is treated as a regular unknown dir - Add sandbox-safe fallback in applyIssues: if rmSync is blocked, rename into apps/ instead of silently failing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
The
/cleancommand was silently failing on two fronts:1.
libraryin ALLOWED_DIRSlibrary/was explicitly whitelisted so it was never reported as an unknown directory and never moved toapps/. Removed it.2.
.cacheandrmSyncblocked in sandbox.cachewas inTEMP_DOTDIRSwhich causedapplyIssuesto callrmSyncon it. In sandboxed environmentsrmSync(recursive delete) is blocked and throws, leaving the directory in place with no error surfaced to the user.Fix: catch the
rmSyncfailure and fall back to renaming the dir intoapps/with a_dot_prefix. Also removed.cachefromTEMP_DOTDIRSso it flows through the normal unknown-dir handling path.Changes
ALLOWED_DIRS: removed'library'TEMP_DOTDIRS: removed'.cache'applyIssues: add try/catch aroundrmSync, fall back torenameSyncintoapps/Branched from
main@20377c6(0.3.10).