Skip missing static files instead of aborting the build - #4211
Skip missing static files instead of aborting the build#4211official-burak wants to merge 2 commits into
Conversation
b1bbf18 to
e5dcc9b
Compare
Dangling symlinks and files that vanish after discovery currently raise FileNotFoundError from copy_file and crash mkdocs build/serve. Warn and continue so a broken media link cannot take down the whole site.
e5dcc9b to
e2ea187
Compare
pathspec 1.x keeps leading whitespace (git-compatible). The user-guide fixture was indented like Python source, so *_unpublished.md never matched and CI aborted on Python versions that install pathspec>=1.
|
The static-copy change is unrelated. CI installs Pushed 67ac6c3: |
|
Follow-up:
Those are hatch/native-dep install failures, not the static-copy change. |
Fixes #4048.
File.copy_filecurrently letsshutil.copyfileraiseFileNotFoundErrorfor a dangling symlink or a source that disappeared after discovery. That abortsmkdocs build/mkdocs serveeven withstrict: false.This catches the missing source, logs a warning, and continues.
is_modified()also treats an unreadable source as modified so a dirty rebuild takes the same warning path instead of crashing onos.path.getmtime.Tests cover a dangling symlink, a deleted source file, and a dirty rebuild that already has a destination copy.