From: Scott C Wilson Date: Sat, 18 Jul 2015 00:42:09 +0000 (-0400) Subject: Add a check for the setting of watch flag in config file X-Git-Tag: v0.15~279 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c00a1fcb7fc6a063725229c267a63b35dbf48d1a;p=brevno-suite%2Fhugo Add a check for the setting of watch flag in config file Fixes #1074 --- diff --git a/commands/server.go b/commands/server.go index c8fe7ee4..64bb1625 100644 --- a/commands/server.go +++ b/commands/server.go @@ -71,6 +71,10 @@ func server(cmd *cobra.Command, args []string) { viper.Set("Watch", true) } + if viper.GetBool("watch") { + serverWatch = true + } + l, err := net.Listen("tcp", net.JoinHostPort(serverInterface, strconv.Itoa(serverPort))) if err == nil { l.Close()