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:
parent
6c8e7edbb4
commit
b268e639ba
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
@ -112,7 +112,7 @@ func main() {
|
||||||
_, err = buildSite(config)
|
_, err = buildSite(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
return
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
err := NewWatcher(config, *port, *server)
|
err := NewWatcher(config, *port, *server)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -122,6 +122,7 @@ func main() {
|
||||||
|
|
||||||
if _, err = buildSite(config); err != nil {
|
if _, err = buildSite(config); err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if *server {
|
if *server {
|
||||||
|
|
Loading…
Add table
Reference in a new issue