Configuration
Operating system: Windows 11
PlatformIO Version (platformio --version): 6.0.2
Description of problem
Clean All fails on files that are "Read Only".
Including a git repository in lib_deps some files in the .git directory are marked read only which blocks cleaning.
Steps to Reproduce
- Have a project include https://github.com/PaulStoffregen/Encoder.git in lib_deps
- Build or let the libs be downloaded
- Run Clean All
Actual Results
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\myuser\\Documents\\GitHub\\My-Project\\.pio\\libdeps\\firebeetle32\\Encoder\\.git\\objects\\pack\\pack-87f987569879568m596f8m96f8fjddl0u.idx':
Expected Results
The files to be removed.
If problems with PlatformIO Build System:
The content of platformio.ini:
[env:firebeetle32]
monitor_speed = 115200
platform = espressif32
board = firebeetle32
framework = arduino
monitor_filters = esp32_exception_decoder
extra_scripts = extra_script.py
board_build.partitions = no_ota.csv
lib_ldf_mode = chain+
lib_compat_mode = strict
lib_deps =
https://github.com/PaulStoffregen/Encoder.git
Additional info
Adding this line os.chmod(dst, stat.S_IWRITE) to the piotarget.py file just before the remove allows the clean to run successfully but I'm not sure if this is the best way to fix it.
Configuration
Operating system: Windows 11
PlatformIO Version (
platformio --version): 6.0.2Description of problem
Clean All fails on files that are "Read Only".
Including a git repository in lib_deps some files in the
.gitdirectory are marked read only which blocks cleaning.Steps to Reproduce
Actual Results
Expected Results
The files to be removed.
If problems with PlatformIO Build System:
The content of
platformio.ini:Additional info
Adding this line
os.chmod(dst, stat.S_IWRITE)to thepiotarget.pyfile just before theremoveallows the clean to run successfully but I'm not sure if this is the best way to fix it.