commands: Handle hugo mod get --help

Fixes #11141
This commit is contained in:
Bjørn Erik Pedersen
2023-06-29 08:53:50 +02:00
parent 58e09cc6c7
commit 80ecb95895
2 changed files with 5 additions and 1 deletions

View File

@@ -224,7 +224,7 @@ Run "go help get" for more information. All flags available for "go get" is also
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
// We currently just pass on the flags we get to Go and
// need to do the flag handling manually.
if len(args) == 1 && args[0] == "-h" {
if len(args) == 1 && args[0] == "-h" || args[0] == "--help" {
return errHelp
}