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

Unable to use blowfish v2.79.0 as a hugo module #1835

Open
sanderploegsma opened this issue Nov 8, 2024 · 7 comments · May be fixed by #1838
Open

Unable to use blowfish v2.79.0 as a hugo module #1835

sanderploegsma opened this issue Nov 8, 2024 · 7 comments · May be fixed by #1838

Comments

@sanderploegsma
Copy link

Describe the bug
Attempted to upgrade blowfish to the latest version in my existing Hugo project, which is set up to use Hugo modules. However, trying to build my site complains about some invalid characters in paths found in the exampleSite directory of the blowfish repo:

$ hugo
go: no module dependencies to download
go: downloading github.com/nunocoracao/blowfish/v2 v2.79.0
hugo: downloading modules …
go: github.com/nunocoracao/blowfish/v2@upgrade: create zip: exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/feature.jpg: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/feature.jpg": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.it.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.it.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.ja.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.ja.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.zh-cn.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.zh-cn.md": invalid char ':'
exampleSite/content/users/Xeonzilla’s Note/feature.jpg: malformed file path "exampleSite/content/users/Xeonzilla’s Note/feature.jpg": invalid char ''
exampleSite/content/users/Xeonzilla’s Note/index.it.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.it.md": invalid char ''
exampleSite/content/users/Xeonzilla’s Note/index.ja.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.ja.md": invalid char ''
exampleSite/content/users/Xeonzilla’s Note/index.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.md": invalid char ''
exampleSite/content/users/Xeonzilla’s Note/index.zh-cn.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.zh-cn.md": invalid char ''
hugo: collected modules in 2666 ms
Total in 2670 ms
Error: failed to load modules: failed to get ["github.com/nunocoracao/blowfish/v2@upgrade"]: failed to execute 'go [get github.com/nunocoracao/blowfish/v2@upgrade]': failed to execute binary "go" with args [get github.com/nunocoracao/blowfish/v2@upgrade]: go: downloading github.com/nunocoracao/blowfish/v2 v2.79.0
go: github.com/nunocoracao/blowfish/v2@upgrade: create zip: exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/feature.jpg: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/feature.jpg": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.it.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.it.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.ja.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.ja.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.md": invalid char ':'
exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.zh-cn.md: malformed file path "exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.zh-cn.md": invalid char ':'
exampleSite/content/users/Xeonzilla’s Note/feature.jpg: malformed file path "exampleSite/content/users/Xeonzilla’s Note/feature.jpg": invalid char ''
exampleSite/content/users/Xeonzilla’s Note/index.it.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.it.md": invalid char ''
exampleSite/content/users/Xeonzilla’s Note/index.ja.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.ja.md": invalid char ''
exampleSite/content/users/Xeonzilla’s Note/index.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.md": invalid char ''
exampleSite/content/users/Xeonzilla’s Note/index.zh-cn.md: malformed file path "exampleSite/content/users/Xeonzilla’s Note/index.zh-cn.md": invalid char ''
 *errors.errorString

To Reproduce
Steps to reproduce the behavior:

Create a new Hugo site from scratch:

hugo new site test && cd test && hugo mod init test && hugo mod tidy

Add the Blowfish module to the Hugo configuration:

cat <<EOF >> hugo.toml
[module]
[[module.imports]]
disable = false
path = "github.com/nunocoracao/blowfish/v2"
EOF

Try to build the site:

hugo

Expected behavior
The Blowfish module downloads normally and my site builds fine.

Desktop (please complete the following information):

  • OS: macOS
  • Version: 15.1

Hugo & Blowfish versions

$ go version
go version go1.23.3 darwin/arm64
$ hugo version
hugo v0.138.0+extended+withdeploy darwin/arm64 BuildDate=2024-11-06T11:22:34Z VendorInfo=brew

Blowfish version: 2.79.0

@sanderploegsma sanderploegsma changed the title Unable to use blowfish as a hugo module Unable to use blowfish v2.79.0 as a hugo module Nov 8, 2024
@deining
Copy link
Contributor

deining commented Nov 8, 2024

This failure is due to the use of special chars like : or ' in directory names.

@wtchangdm
Copy link
Contributor

wtchangdm commented Nov 8, 2024

just noticed this as well, I think we either:

  • find a way to exclude the exampleSite in hugo module, or
  • have to replace characters like : and with something else
  • or ....just use the url for the sites (seems easiest)

@wtchangdm wtchangdm linked a pull request Nov 8, 2024 that will close this issue
@sanderploegsma
Copy link
Author

What is the benefit of including the example site in the module at all?

Excluding it seems like a fine option for me, and would also greatly reduce the module size.

@wtchangdm
Copy link
Contributor

wtchangdm commented Nov 9, 2024 via email

@eallion
Copy link
Contributor

eallion commented Nov 9, 2024

Same

$ git checkout 3a50c14d2fac08ac58c728463b3098da81198428
error: invalid path 'exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/feature.jpg'
error: invalid path 'exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.it.md'
error: invalid path 'exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.ja.md'
error: invalid path 'exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.md'
error: invalid path 'exampleSite/content/users/Handbook on Teaching Empirical Software Engineering: Online Materials/index.zh-cn.md'

@unacro
Copy link
Contributor

unacro commented Nov 10, 2024

Use : in path is ABSOLUTELY stupid.
Just invalid both in Git & Linux system.

I think simply rename the directory name would be better:
Handbook on Teaching Empirical Software Engineering: Online Materials -> Handbook on Teaching Empirical Software Engineering - Online Materials etc.

@tigattack
Copy link

I'm also experiencing this issue. I'm sure I can speak for us all when I say I'd greatly appreciate @nunocoracao's attention on this as it's completely blocking an upgrade to the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants