Fail fast on env template failures

This commit is contained in:
Michael Schurter 2017-05-24 13:42:08 -07:00
parent bf0be17ddd
commit ce8c4fa520

View file

@ -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()
@ -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: