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

Module mounts with identical sources are not recursively copied to targets #9426

Closed
robbymilo opened this issue Jan 26, 2022 · 3 comments · Fixed by #9428
Closed

Module mounts with identical sources are not recursively copied to targets #9426

robbymilo opened this issue Jan 26, 2022 · 3 comments · Fixed by #9428
Assignees
Milestone

Comments

@robbymilo
Copy link

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

hugo v0.92.0-B3549403+extended linux/amd64 BuildDate=2022-01-12T08:23:18Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes.

What happened:
Added three (3) module mounts - two (2) have the same source, but different targets. In config.toml for example:

[[module.mounts]]
source = "content"
target = "content"

[[module.mounts]]
source = "extra-content"
target = "content/resources-a"

[[module.mounts]]
source = "extra-content"
target = "content/resources-b"

Note the extra-content dir contains subdirs, and the resulting public output:

Screenshot from 2022-01-26 16-02-15

What I expected to happened:
public/resources-b would also contain extra-content/subdir.


To reproduce with 0.92.0:

git clone [email protected]:robbymilo/hugo-bug.git
cd hugo-bug && git chceckout module-mounts
hugo
ls -Ral public/resources*

You will see the difference between
public/resources-a and
public/resources-b.

public/resources-a contains the subdirs for extra-content, while public/resources-b does not.

@robbymilo robbymilo changed the title Multiple module mounts with identical sources are not recursively copied to targets Module mounts with identical sources are not recursively copied to targets Jan 26, 2022
@jmooring
Copy link
Member

Confirmed. MRE:

git clone --single-branch -b hugo-github-issue-9426 https://github.com/jmooring/hugo-testing hugo-github-issue-9426
cd hugo-github-issue-9426
hugo && tree public

@bep bep removed the NeedsTriage label Jan 26, 2022
@bep bep added this to the v0.93.0 milestone Jan 26, 2022
@bep bep self-assigned this Jan 26, 2022
@bep
Copy link
Member

bep commented Jan 26, 2022

Yea, that's a bug -- we throw away duplicate source directories when walking to prevent cyclic references (from symbolic links) ... I will look if that can be handled differently.

@bep bep modified the milestones: v0.93.0, v0.92.1 Jan 26, 2022
bep added a commit to bep/hugo that referenced this issue Jan 26, 2022
bep added a commit to bep/hugo that referenced this issue Jan 26, 2022
bep added a commit to bep/hugo that referenced this issue Jan 26, 2022
bep added a commit to bep/hugo that referenced this issue Jan 26, 2022
@bep bep closed this as completed in #9428 Jan 26, 2022
bep added a commit that referenced this issue Jan 26, 2022
@github-actions
Copy link

github-actions bot commented Feb 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 Feb 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants