You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We store our book source in Perforce which typically causes files on the local drive to be read-only.
When we mdbook build, our images from the src/image directory end up marked as read-only in the book/img directory and subsequent builds will fail like this:
..\build\bin\mdbook.exe build
2019-08-21 08:05:41 [INFO] (mdbook::book): Book building has started
2019-08-21 08:05:41 [ERROR] (mdbook::utils): Error: Unable to clear output directory
2019-08-21 08:05:41 [ERROR] (mdbook::utils): Caused By: Access is denied. (os error 5)
Would it be possible to copy the files and drop the RO attribute, or to be more forceful in cleaning the output directory.
The following steps should reproduce on Windows:
> mdbook init
Do you want a .gitignore to be created? (y/n)
n
What title would you like to give the book?
test
> mkdir src\img
> echo dummy > src\img\test.png
> attrib +R src\img\test.png
> mdbook build <-- Success when book dir doesn't exist
> mdbook build <-- Failure when book dir contains RO file
The text was updated successfully, but these errors were encountered:
This also breaks building mdbook books under Nix (https://nixos.org/).
With Nix, the source tree is read-only. For some reason, additional-css files are copied twice (probably #1156), and the second copy fails with EACCESS because the first copy also set the access mode of the destination file to read-only.
We store our book source in Perforce which typically causes files on the local drive to be read-only.
When we
mdbook build
, our images from thesrc/image
directory end up marked as read-only in thebook/img
directory and subsequent builds will fail like this:Would it be possible to copy the files and drop the RO attribute, or to be more forceful in cleaning the output directory.
The following steps should reproduce on Windows:
The text was updated successfully, but these errors were encountered: