Skip to content

Commit

Permalink
Fail fast on env template failures
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed May 24, 2017
1 parent 826aec4 commit 0288582
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/consul_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ WAIT:
for _, t := range tm.templates {
if err := loadTemplateEnv(envBuilder, taskDir, t); err != nil {
tm.hook.Kill("consul-template", err.Error(), true)
return
}
}
allRenderedTime = time.Now()
Expand Down Expand Up @@ -254,6 +255,7 @@ WAIT:
if err := loadTemplateEnv(envBuilder, taskDir, tmpl); err != nil {

tm.hook.Kill("consul-template", err.Error(), true)
return
}
switch tmpl.ChangeMode {
case structs.TemplateChangeModeSignal:
Expand Down

0 comments on commit 0288582

Please sign in to comment.