From d6472c68f19a78ec4a993fa20708c8c993b8fa84 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 16 Feb 2016 21:18:33 +0000 Subject: [PATCH] add viper.reset --- utils/utils.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/utils.go b/utils/utils.go index 01d3e6fd..5716dac9 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -14,6 +14,7 @@ import ( "github.com/hacdias/caddy-hugo/assets" "github.com/hacdias/caddy-hugo/config" "github.com/spf13/hugo/commands" + "github.com/spf13/viper" ) // CanBeEdited checks if the extension of a file is supported by the editor @@ -168,6 +169,7 @@ func Run(c *config.Config) { os.RemoveAll(c.Path + "public") commands.MainSite = nil + viper.Reset() c.Args = append([]string{"--source", c.Path}, c.Args...) commands.HugoCmd.ParseFlags(c.Args) if err := commands.HugoCmd.RunE(nil, nil); err != nil {