From: Bjørn Erik Pedersen Date: Sat, 21 Aug 2021 14:32:20 +0000 (+0200) Subject: Revert "commands: Avoid too many watch file handles causing the server to fail to... X-Git-Tag: v0.88.0~21 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ffa2fe61172aa0d892234b23d1497c77a6a7f5c4;p=brevno-suite%2Fhugo Revert "commands: Avoid too many watch file handles causing the server to fail to start" This reverts commit 3f38c785b7208440e2a9dd9a80cb39d4ae23e676. --- diff --git a/commands/server.go b/commands/server.go index 48e76da6..09cf43b2 100644 --- a/commands/server.go +++ b/commands/server.go @@ -261,11 +261,6 @@ func (sc *serverCmd) server(cmd *cobra.Command, args []string) error { s.RegisterMediaTypes() } - err = c.serve(sc) - if err != nil { - return err - } - // Watch runs its own server as part of the routine if sc.serverWatch { @@ -288,7 +283,7 @@ func (sc *serverCmd) server(cmd *cobra.Command, args []string) error { } - return nil + return c.serve(sc) } func getRootWatchDirsStr(baseDir string, watchDirs []string) string {