New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled exception when symlinking isn't allowed #4051
Comments
As discussed in #4009 (comment), the solution is to just swallow symlinking errors and circumvent caching for the affected external resources. Additionally, we'll print a warning message on plugin initialization when symlinking is not supported. This is not a bug, but an enhancement to make the privacy plugin work in restricted environments. |
Fixed in squidfunk/mkdocs-material-insiders@8330445. We now catch the symbolic link error and just continue. This means that the plugin will re-request each extension-less file once during the build and on subsequent builds. |
@wilhelmer did you have a chance to test the latest changes? Happy to wrap up the next release, if it works. |
My Windows colleague says it works! 😄 👍 |
Perfect, thanks for testing! I'll push something out asap. |
Released as part of 8.3.9+insiders-4.19.2. |
@squidfunk Late follow-up: I haven't worked on a Windows PC for a while, but now I see that we're getting thousands (!) of Could we please issue one single warning during build that symbolic linking isn't supported and files can't be cached? |
Sure, could you please create a new issue for that? |
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
See our discussion here.
In summary, if you're working on a Windows machine where symlinking isn't allowed, include the privacy plugin, have assets that require symlinking, and want to build locally, the following exception will be raised:
I did more research on this, and it seems the edge case is pretty much on our side. Usually, symlinking should be allowed on Windows, even without admin rights. There's a dedicated user right called "Create symbolic links", which apparently our IT department took away from us, God knows why. You can also enable Windows developer mode to allow symlinking. For more information, see here.
So I think all we need here is exception handling and a warning message explaining that symlinking has to be enabled. (Maybe it can also be disabled on Unix? So it could be useful on any OS.).
Expected behaviour
Actual behaviour
Steps to reproduce
Package versions
Configuration
System information
The text was updated successfully, but these errors were encountered: