Better error handling when rendering error found when in watch mode

In watch mode it should continue to watch for changes, in any other mode it should exit with a -1 error code so can check for success when scripting
This commit is contained in:
spf13
2013-10-25 18:03:14 -04:00
parent 764abd2067
commit b580a25d1f
3 changed files with 26 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ func server(cmd *cobra.Command, args []string) {
Config.BaseUrl = "http://localhost:" + strconv.Itoa(serverPort)
}
build()
build(serverWatch)
// Watch runs its own server as part of the routine
if serverWatch {