-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Milestone
Description
What version of Hugo are you using (hugo version
)?
$ hugo version hugo v0.126.1+extended darwin/arm64 BuildDate=2024-05-15T10:42:34Z VendorInfo=brew
Does this issue reproduce with the latest release?
Yes.
Issue
Running the Hugo module update does not accept the global --source
flag:
$ hugo mod get -s ./docs -u
flag provided but not defined: -s
usage: go get [-t] [-u] [-v] [build flags] [packages]
Run 'go help get' for details.
Error: failed to get ["-d" "-s" "./docs" "-u"]: failed to execute 'go [get -d -s ./docs -u]': failed to execute binary "go" with args [get -d -s ./docs -u]: flag provided but not defined: -s
usage: go get [-t] [-u] [-v] [build flags] [packages]
Run 'go help get' for details.
*errors.errorString
$ hugo mod get --source ./docs -u
flag provided but not defined: -source
usage: go get [-t] [-u] [-v] [build flags] [packages]
Run 'go help get' for details.
Error: failed to get ["-d" "--source" "./docs" "-u"]: failed to execute 'go [get -d --source ./docs -u]': failed to execute binary "go" with args [get -d --source ./docs -u]: flag provided but not defined: -source
usage: go get [-t] [-u] [-v] [build flags] [packages]
Run 'go help get' for details.
*errors.errorString
I'm wondering if this is the expected behaviour, since the help clearly states I can use that flag:
Usage:
hugo mod get [flags] [args]
Flags:
-h, --help help for get
Global Flags:
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
--config string config file (default is hugo.yaml|json|toml)
--configDir string config dir (default "config")
--debug debug output
-d, --destination string filesystem path to write files to
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--quiet build in quiet mode
--renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
--themesDir string filesystem path to themes directory
-v, --verbose verbose output
The recursive update works as intended:
$ hugo mod get -u ./...
Update module in /Users/floren/github/website/docs
Update module in /Users/floren/github/website/global
There are no issues running hugo mod tidy -s ./docs
, for example.