From 5f4f80d85dd780fdc040fe9bb01fc33d7ba60205 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Sat, 14 Jan 2017 15:05:40 -0800 Subject: [PATCH] fix lookup --- client/consul_template.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/consul_template.go b/client/consul_template.go index 0c4338048..5a60f893e 100644 --- a/client/consul_template.go +++ b/client/consul_template.go @@ -390,13 +390,13 @@ func parseTemplateConfigs(tmpls []*structs.Template, taskDir string, dest = filepath.Join(taskDir, taskEnv.ReplaceEnv(tmpl.DestPath)) } - ct := ctconf.TemplateConfig{ - Source: &src, - Destination: &dest, - Contents: &tmpl.EmbeddedTmpl, - } + ct := ctconf.DefaultTemplateConfig() + ct.Source = &src + ct.Destination = &dest + ct.Contents = &tmpl.EmbeddedTmpl + ct.Finalize() - ctmpls[ct] = tmpl + ctmpls[*ct] = tmpl } return ctmpls, nil