`hugo mod get -u ./...` seems does not update all modules to latest version

Hi, I’ve been in this situation several times, hugo mod get -u ./... doesn’t work for me, I need to
explicitly specify the module path to upgrade. Which parts am I missing?

Thanks :pray:

➜  site git:(site) ✗ hugo mod get -u ./...
Update module in /home/razonyang/Projects/razonyang/hugo-mod-icons/site

➜  site git:(site) ✗ hugo mod get -u ./...
Update module in /home/razonyang/Projects/razonyang/hugo-mod-icons/site

➜  site git:(site) ✗ hugo mod get -u ./...
Update module in /home/razonyang/Projects/razonyang/hugo-mod-icons/site

➜  site git:(site) ✗ hugo mod get -u github.com/razonyang/hb/modules/base
go: downloading github.com/razonyang/hb/modules/base v0.3.4
go: upgraded github.com/razonyang/hb/modules/base v0.3.3 => v0.3.4

Configuration as follows.

module:
  imports:
    - path: github.com/razonyang/hb/modules/base

Additional information

When enable verbose output, got

$ hugo mod get -u -v ./...
Update module in /home/razonyang/Projects/razonyang/hugo-mod-icons/site
go: no package to get in current directory

My go.mod as follows.

module github.com/razonyang/hugo-mod-icons/site

go 1.19

require (
	github.com/razonyang/hb v0.4.2 // indirect
	github.com/razonyang/hb/modules/base v0.3.4 // indirect
        // ...
)
$ hugo version
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended linux/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio

Close it in favor of tracking the issue on GitHub.

I suspect you have found a bug … or, I think, something that stopped working because Go somehow changed a little under the covers. I think I have seen this myself, but I guess I brushed it off as a “non issue”. It should be easy to fix, though, so if you can create a GH issue, I’ll have a look. I’m planning a Hugo release in a week or so …

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.