summaryrefslogtreecommitdiffstats
path: root/commands/mod.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-13 11:17:19 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-13 11:17:19 +0200
commit17ca8f0c4c636752fb9da2ad551679275dc03dd3 (patch)
treede42ffe9cf12a96220db5442c47f6cecf2eb172a /commands/mod.go
parent9e571827055dedb46b78c5db3d17d6913f14870b (diff)
commands: Fix faulty -h logic in hugo mod get
Fixes #6197
Diffstat (limited to 'commands/mod.go')
-rw-r--r--commands/mod.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/commands/mod.go b/commands/mod.go
index 861704e35..04442a9b2 100644
--- a/commands/mod.go
+++ b/commands/mod.go
@@ -15,7 +15,6 @@ package commands
import (
"os"
- "strings"
"github.com/gohugoio/hugo/modules"
"github.com/spf13/cobra"
@@ -80,7 +79,7 @@ Run "go help get" for more information. All flags available for "go get" is also
return c.withModsClient(false, func(c *modules.Client) error {
// We currently just pass on the flags we get to Go and
// need to do the flag handling manually.
- if len(args) == 1 && strings.Contains(args[0], "-h") {
+ if len(args) == 1 && args[0] == "-h" {
return cmd.Help()
}
return c.Get(args...)