summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorNoah Campbell <noahcampbell@gmail.com>2013-09-01 11:39:32 -0700
committerNoah Campbell <noahcampbell@gmail.com>2013-09-01 11:39:32 -0700
commitb268e639baeb95b11e98a9595577ce7c356b5262 (patch)
tree631f5d0f16ba71d2c87f5aef98c9c73fb06002de /main.go
parent6c8e7edbb42f9a4b5795f195cbf18c68674e9af4 (diff)
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.
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index 8ff08f7fc..5f421c483 100644
--- a/main.go
+++ b/main.go
@@ -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 {