mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
add viper.reset
This commit is contained in:
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
Block a user