mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
commands: Ignore "module does not exist" errors in hugo mod init
Closes #11458
This commit is contained in:
@@ -699,6 +699,9 @@ func (c *collector) normalizeMounts(owner *moduleAdapter, mounts []Mount) ([]Mou
|
||||
}
|
||||
|
||||
func (c *collector) wrapModuleNotFound(err error) error {
|
||||
if c.Client.ccfg.IgnoreModuleDoesNotExist {
|
||||
return nil
|
||||
}
|
||||
err = fmt.Errorf(err.Error()+": %w", ErrNotExist)
|
||||
if c.GoModulesFilename == "" {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user