-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Improve resources.Copy to prevent nil pointer when using unusual construct #12310
Comments
gglanzani
added a commit
to gglanzani/hugola
that referenced
this issue
Mar 25, 2024
jmooring
added a commit
to jmooring/hugo
that referenced
this issue
Mar 25, 2024
jmooring
added a commit
to jmooring/hugo
that referenced
this issue
Mar 26, 2024
jmooring
added a commit
to jmooring/hugo
that referenced
this issue
Mar 26, 2024
bep
pushed a commit
that referenced
this issue
Mar 27, 2024
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Reference: https://discourse.gohugo.io/t/nil-pointer-evaluating-resource-resource-relpermalink-when-using-resources-copy/49030/14
Error:
Notes:
Minimal reproducible example:
Test case:
In the above,
resources.Get "/p1/b.txt"
is not a typographical error. Again, the example reported in the forum topic makes sense; the above is a minimal reproducer.My best guess is that we cache a nil resource when calling the shortcode, and resources.Copy doesn't overwrite it because... it's cached.
The text was updated successfully, but these errors were encountered: