add viper.reset
parent
2414f2edec
commit
d6472c68f1
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue