Skip to content
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

'hugo server --renderStaticToDisk' failing in windows #9647

Closed
arif254 opened this issue Mar 10, 2022 · 2 comments
Closed

'hugo server --renderStaticToDisk' failing in windows #9647

arif254 opened this issue Mar 10, 2022 · 2 comments
Assignees
Milestone

Comments

@arif254
Copy link

arif254 commented Mar 10, 2022

What version of Hugo are you using (hugo version)?

$ hugo env
hugo v0.94.0-63B23660+extended windows/amd64 BuildDate=2022-03-10T09:46:36Z VendorInfo=gohugoio
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.17.6"

Does this issue reproduce with the latest release?

Yes, see below.

$ hugo server --renderStaticToDisk
Error: add site dependencies: create deps: create PathSpec: mkdir C:\Users\Site\public\: file does not exist
@bep bep added this to the v0.94.1 milestone Mar 11, 2022
@bep bep self-assigned this Mar 11, 2022
@bep bep removed the NeedsTriage label Mar 11, 2022
bep added a commit to bep/hugo that referenced this issue Mar 11, 2022
@bep
Copy link
Member

bep commented Mar 11, 2022

I have spent some time this morning looking into this, and yes, it fails on Windows, but I don't see a simple fix, so I think I need to revert it for now.

The core gist of it is that we use Afero's CopyOnWriteFs as the Destination, which should cover both the serving and publishing; this works on MacOs, at least, but on Windows it seem to try to propagate writes (MkDirs) up to the readable layer. I'm not sure I got the details here right, but this at least need a closer look.

I will push som better server tests so we can avoid this in the future.

bep added a commit to bep/hugo that referenced this issue Mar 11, 2022
bep added a commit to bep/hugo that referenced this issue Mar 11, 2022
bep added a commit that referenced this issue Mar 11, 2022
@bep bep closed this as completed Mar 12, 2022
bep added a commit to bep/hugo that referenced this issue Mar 12, 2022
bep added a commit that referenced this issue Mar 14, 2022
@github-actions
Copy link

github-actions bot commented Apr 3, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants