mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
b64617fe4f
commit
6315098104
2 changed files with 12 additions and 4 deletions
|
@ -349,7 +349,8 @@ path="ok"
|
||||||
path="incompat1"
|
path="incompat1"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path="incompat2"
|
path="incompat2"
|
||||||
|
[[module.imports]]
|
||||||
|
path="incompat3"
|
||||||
|
|
||||||
`)
|
`)
|
||||||
|
|
||||||
|
@ -368,6 +369,12 @@ max = "0.45.0"
|
||||||
b.WithSourceFile("themes/incompat2/theme.toml", `
|
b.WithSourceFile("themes/incompat2/theme.toml", `
|
||||||
min_version = "5.0.0"
|
min_version = "5.0.0"
|
||||||
|
|
||||||
|
`)
|
||||||
|
|
||||||
|
// Issue 6162
|
||||||
|
b.WithSourceFile("themes/incompat3/theme.toml", `
|
||||||
|
min_version = 0.55.0
|
||||||
|
|
||||||
`)
|
`)
|
||||||
|
|
||||||
logger := loggers.NewWarningLogger()
|
logger := loggers.NewWarningLogger()
|
||||||
|
@ -377,7 +384,7 @@ min_version = "5.0.0"
|
||||||
|
|
||||||
c := qt.New(t)
|
c := qt.New(t)
|
||||||
|
|
||||||
c.Assert(logger.WarnCounter.Count(), qt.Equals, uint64(2))
|
c.Assert(logger.WarnCounter.Count(), qt.Equals, uint64(3))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -412,10 +412,11 @@ func (c *collector) applyThemeConfig(tc *moduleAdapter) error {
|
||||||
}
|
}
|
||||||
themeCfg, err = metadecoders.Default.UnmarshalToMap(data, metadecoders.TOML)
|
themeCfg, err = metadecoders.Default.UnmarshalToMap(data, metadecoders.TOML)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "failed to read module config for %q in %q", tc.Path(), themeTOML)
|
c.logger.WARN.Printf("Failed to read module config for %q in %q: %s", tc.Path(), themeTOML, err)
|
||||||
}
|
} else {
|
||||||
maps.ToLower(themeCfg)
|
maps.ToLower(themeCfg)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if hasConfig {
|
if hasConfig {
|
||||||
if configFilename != "" {
|
if configFilename != "" {
|
||||||
|
|
Loading…
Reference in a new issue