modules: Do not try to get local themes in "hugo mod get"

Fixes #6893
This commit is contained in:
Bjørn Erik Pedersen 2020-02-18 13:35:29 +01:00
parent a21a9373e0
commit 20f2211fce
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
1 changed files with 7 additions and 0 deletions

View File

@ -264,6 +264,13 @@ func (c *Client) Get(args ...string) error {
// We need to be explicit about the modules to get.
for _, m := range c.moduleConfig.Imports {
if !isProbablyModule(m.Path) {
// Skip themes/components stored below /themes etc.
// There may be false positives in the above, but those
// should be rare, and they will fail below with an
// "cannot find module providing ..." message.
continue
}
var args []string
if update {
args = []string{"-u"}