Return an error (other than 0) when ./hugo fails

Being a good OS citizen so folks can compose hugo into their tool chain.
Also helps with git bisect run.
This commit is contained in:
Noah Campbell 2013-09-01 11:39:32 -07:00
parent 6c8e7edbb4
commit b268e639ba

View file

@ -112,7 +112,7 @@ func main() {
_, err = buildSite(config)
if err != nil {
fmt.Println(err)
return
os.Exit(-1)
}
err := NewWatcher(config, *port, *server)
if err != nil {
@ -122,6 +122,7 @@ func main() {
if _, err = buildSite(config); err != nil {
fmt.Println(err)
os.Exit(-1)
}
if *server {