Skip to content

fix(clean): remove library from ALLOWED_DIRS and sandbox-safe rmSync fallback#5

Open
jestersimpps wants to merge 1 commit intomainfrom
fix/clean-script-bugs-v2
Open

fix(clean): remove library from ALLOWED_DIRS and sandbox-safe rmSync fallback#5
jestersimpps wants to merge 1 commit intomainfrom
fix/clean-script-bugs-v2

Conversation

@jestersimpps
Copy link
Copy Markdown
Owner

What broke

The /clean command was silently failing on two fronts:

1. library in ALLOWED_DIRS

library/ was explicitly whitelisted so it was never reported as an unknown directory and never moved to apps/. Removed it.

2. .cache and rmSync blocked in sandbox

.cache was in TEMP_DOTDIRS which caused applyIssues to call rmSync on it. In sandboxed environments rmSync (recursive delete) is blocked and throws, leaving the directory in place with no error surfaced to the user.

Fix: catch the rmSync failure and fall back to renaming the dir into apps/ with a _dot_ prefix. Also removed .cache from TEMP_DOTDIRS so it flows through the normal unknown-dir handling path.

Changes

  • ALLOWED_DIRS: removed 'library'
  • TEMP_DOTDIRS: removed '.cache'
  • applyIssues: add try/catch around rmSync, fall back to renameSync into apps/

Branched from main @ 20377c6 (0.3.10).

…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
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.

1 participant