about summary refs log tree commit diff
path: root/templater
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2017-04-04T12·36+0200
committerVincent Ambo <tazjin@gmail.com>2017-04-04T18·06+0200
commit746e733cbbc8aef939eb2c3a695d5c41bbb4cb5a (patch)
treeaa56c61e0bd9059c1417ccf48fe21a9695a4314f /templater
parent11cfc80020010ff949de767698124cc5719361e0 (diff)
fix templater: Don't try to template default value files
Diffstat (limited to 'templater')
-rw-r--r--templater/templater.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/templater/templater.go b/templater/templater.go
index e9e8c11e927a..67e33a5355f1 100644
--- a/templater/templater.go
+++ b/templater/templater.go
@@ -156,8 +156,12 @@ func templateFuncs() template.FuncMap {
 	return m
 }
 
-// Checks whether a file is a resource file (i.e. is YAML or JSON)
+// Checks whether a file is a resource file (i.e. is YAML or JSON) and not a default values file.
 func isResourceFile(f os.FileInfo) bool {
+	if f.Name() == "default.json" || f.Name() == "default.yaml" {
+		return false
+	}
+
 	return strings.HasSuffix(f.Name(), "yaml") ||
 		strings.HasSuffix(f.Name(), "yml") ||
 		strings.HasSuffix(f.Name(), "json")