mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
hugolib: Only set 'allThemes' if there are themes in the config file
When the 'allThemes' configuration setting is read, it will panic if there are no themes. This was a regression introduced in Hugo 0.42. Also updated a unit test to check for this. Fixes #4851
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
2f2bc7ff70
commit
38204c4ab6
@@ -42,6 +42,8 @@ func TestLoadConfig(t *testing.T) {
|
||||
assert.Equal("side", cfg.GetString("paginatePath"))
|
||||
// default
|
||||
assert.Equal("layouts", cfg.GetString("layoutDir"))
|
||||
// no themes
|
||||
assert.False(cfg.IsSet("allThemes"))
|
||||
}
|
||||
|
||||
func TestLoadMultiConfig(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user