modules: Print required Hugo version for incompatible modules

This commit is contained in:
razonyang 2023-12-30 21:28:35 +08:00 committed by Bjørn Erik Pedersen
parent 63e0a92894
commit 60d954c785

View file

@ -126,7 +126,7 @@ func (m ModulesConfig) HasConfigFile() bool {
func (m *ModulesConfig) setActiveMods(logger loggers.Logger) error {
for _, mod := range m.AllModules {
if !mod.Config().HugoVersion.IsValid() {
logger.Warnf(`Module %q is not compatible with this Hugo version; run "hugo mod graph" for more information.`, mod.Path())
logger.Warnf(`Module %q is not compatible with this Hugo version: %s; run "hugo mod graph" for more information.`, mod.Path(), mod.Config().HugoVersion)
}
}