modules: Do not try to get local themes in "hugo mod get" - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 20f2211fce55e1811629245f9e5e4a2ac754d788
DIR parent a21a9373e06091ab70d8a5f4da8ff43f7c609b4b
HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Tue, 18 Feb 2020 13:35:29 +0100
modules: Do not try to get local themes in "hugo mod get"
Fixes #6893
Diffstat:
M modules/client.go | 7 +++++++
1 file changed, 7 insertions(+), 0 deletions(-)
---
DIR diff --git a/modules/client.go b/modules/client.go
@@ -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"}