bookends

commit 565397dc7f5b9ab86a70ae54f1610b90d8d55cf5

Author: Honza Pokorny <honza@redhat.com>

Exit with 1 on error

 cmd/build.go | 2 ++
 cmd/cache.go | 2 ++


diff --git a/cmd/build.go b/cmd/build.go
index a7f775d16f626e2a03fba44ef46712f01068fcc3..8ec4c73b7f61f1035d38ef8a42593f7c26aa0484 100644
--- a/cmd/build.go
+++ b/cmd/build.go
@@ -18,6 +18,7 @@ package cmd
 
 import (
 	"fmt"
+	"os"
 
 	"git.pokorny.ca/bookends/pkg/bookends"
 	"github.com/spf13/cobra"
@@ -36,6 +37,7 @@ 		}
 		err := bookends.Build(config)
 		if err != nil {
 			fmt.Println(err)
+			os.Exit(1)
 		}
 	},
 }




diff --git a/cmd/cache.go b/cmd/cache.go
index 38881632a2bab151c544d88649adfbe4df6062b1..4be3490b7d8008f75c150809761123d3a15e5182 100644
--- a/cmd/cache.go
+++ b/cmd/cache.go
@@ -18,6 +18,7 @@ package cmd
 
 import (
 	"fmt"
+	"os"
 
 	"git.pokorny.ca/bookends/pkg/bookends"
 	"github.com/spf13/cobra"
@@ -36,6 +37,7 @@ 		}
 		err := bookends.CacheCovers(config)
 		if err != nil {
 			fmt.Println("ERROR", err)
+			os.Exit(1)
 		}
 	},
 }