about summary refs log tree commit diff
path: root/main.go
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2017-02-09T14·44+0100
committerVincent Ambo <tazjin@gmail.com>2017-02-09T14·50+0100
commitc181decd9d6584ecd7b5d5596f25f7739442a328 (patch)
treec38a18bfe23944f1a28114cafc399b6b45af7ca2 /main.go
parent2f6e0081214b4033132725065014c5022b997c92 (diff)
fix main: Add a forgotten error check
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 2f5f1b9b34f4..00d06e7dc0a2 100644
--- a/main.go
+++ b/main.go
@@ -40,9 +40,13 @@ func templateCommand() cli.Command {
 		Action: func(c *cli.Context) error {
 			include := c.StringSlice("include")
 			exclude := c.StringSlice("exclude")
+
 			ctx, err := loadContext(c)
-			resources, err := templater.LoadAndPrepareTemplates(&include, &exclude, ctx)
+			if err != nil {
+				return err
+			}
 
+			resources, err := templater.LoadAndPrepareTemplates(&include, &exclude, ctx)
 			if err != nil {
 				return err
 			}