summaryrefslogtreecommitdiffstats
path: root/hugolib/paths/paths.go
diff options
context:
space:
mode:
authorAnton Harniakou <anton.harniakou@gmail.com>2019-01-13 12:44:38 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-01-13 20:13:59 +0000
commitdb3c49d049193e0fc225fe4bdb95712c311d6615 (patch)
tree6b888da6387d577a6ff9ccfc66935e79c42759d3 /hugolib/paths/paths.go
parente3cb8e6c7874d7dfe1d4d1c7f5c9765b681fb647 (diff)
Make hugo server -t work again
This commit solves an issue where hugo would ignore the cli -t flag and only use a theme defined in config.toml. Also allow -t flag to accept a string slice. Closes #5569 Closes #5061 Related #4868
Diffstat (limited to 'hugolib/paths/paths.go')
-rw-r--r--hugolib/paths/paths.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/paths/paths.go b/hugolib/paths/paths.go
index 7de0d9ffe..df66e2a46 100644
--- a/hugolib/paths/paths.go
+++ b/hugolib/paths/paths.go
@@ -176,7 +176,7 @@ func New(fs *hugofs.Fs, cfg config.Provider) (*Paths, error) {
PaginatePath: cfg.GetString("paginatePath"),
}
- if cfg.IsSet("allThemes") {
+ if !cfg.IsSet("theme") && cfg.IsSet("allThemes") {
p.AllThemes = cfg.Get("allThemes").([]ThemeConfig)
} else {
p.AllThemes, err = collectThemeNames(p)