mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
modules: Fix "hugo mod get -u" with no arguments
Fixes #6826 Closes #6825
This commit is contained in:
@@ -20,8 +20,6 @@ import (
|
||||
|
||||
"golang.org/x/sync/semaphore"
|
||||
|
||||
"github.com/gohugoio/hugo/modules"
|
||||
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/gohugoio/hugo/common/herrors"
|
||||
@@ -312,14 +310,8 @@ func (c *commandeer) loadConfig(mustHaveConfigFile, running bool) error {
|
||||
doWithCommandeer,
|
||||
doWithConfig)
|
||||
|
||||
if err != nil {
|
||||
if mustHaveConfigFile {
|
||||
return err
|
||||
}
|
||||
if err != hugolib.ErrNoConfigFile && !modules.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
if err != nil && mustHaveConfigFile {
|
||||
return err
|
||||
} else if mustHaveConfigFile && len(configFiles) == 0 {
|
||||
return hugolib.ErrNoConfigFile
|
||||
}
|
||||
|
Reference in New Issue
Block a user