diff --git a/main.go b/main.go index 2f5f1b9b3..00d06e7dc 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) + ctx, err := loadContext(c) + if err != nil { + return err + } + + resources, err := templater.LoadAndPrepareTemplates(&include, &exclude, ctx) if err != nil { return err }