fix(cli): delete profile directories with read-only file recovery - #43377
fix(cli): delete profile directories with read-only file recovery#43377zhao0112 wants to merge 1 commit into
Conversation
Related to open #43340 and merged #57333. Current main now has the broader profile-delete recovery path (profile-bound backend cleanup plus retrying removal), so this stale branch is not a duplicate. Please rebase or salvage any remaining immutable-file handling. |
|
Heads up on overlap with The one genuinely novel bit here is the For context: the headline #47368 symptom (profile reappearing) is fixed by #49435 (recreation guard, merging), and the 3.11 |
|
Thanks for addressing a real deletion-recovery edge case. Current main already covers the read-only chmod/retry portion, but the immutable-flag delta remains useful. Problems
Suggested changes
Automated hermes-sweeper review. |
Summary
hermes profile deleterobust against read-only/immutable files by using ashutil.rmtreeonerrorhandler._make_writableinhermes_cli/profiles.pyto clear filesystem-level write restrictions (chmod+ best-effortchflags) and retry deletion.PermissionError.Testing
python3 -m py_compile hermes_cli/profiles.py tests/hermes_cli/test_profiles.pypython3 -m pytest -o addopts='' -q tests/hermes_cli/test_profiles.pyCloses #43339