Description
amplifier update fails on Windows when clearing cached module directories. Every module cache entry fails to clear, and all bundle updates subsequently fail. Occurs on both normal updates and --force updates.
Error Output
Could not clear ...amplifier-module-context-simple-...: [WinError 5] Access is denied:
'...\.git\objects\pack\pack-....idx'
Could not clear ...amplifier-module-hooks-logging-...: [WinError 5] Access is denied: ...
... (repeats for all modules)
⚠ Update completed with errors
✗ Bundle: amplifier: [WinError 5] Access is denied: ...
✗ Bundle: browser-tester: [WinError 5] Access is denied: ...
(all bundles fail)
Root Cause
Git pack files (.git/objects/pack/*.idx, .pack) are created read-only on Windows. Python's shutil.rmtree() does not handle read-only files on Windows.
Affected components:
amplifier-app-cli: cache_management.py, module_cache.py, reset.py, sources_compat.py
amplifier-foundation: sources/git.py (bundle cache clearing)
Fix
microsoft/amplifier-app-cli#152
microsoft/amplifier-foundation#137