Fix it so disable a module does not disable transitive dependency required by others

The motivation behind the original implementation was probably to show disabled modules when running `hugo mod graph`.

Fixes #11376
This commit is contained in:
Bjørn Erik Pedersen
2023-08-23 12:39:24 +02:00
parent 9a8c84d600
commit dcf425c846
8 changed files with 37 additions and 42 deletions

View File

@@ -83,7 +83,7 @@ func New(fs *hugofs.Fs, cfg config.AllProvider) (*Paths, error) {
}
func (p *Paths) AllModules() modules.Modules {
return p.Cfg.GetConfigSection("activeModules").(modules.Modules)
return p.Cfg.GetConfigSection("allModules").(modules.Modules)
}
// GetBasePath returns any path element in baseURL if needed.