builder: handle escapes without swallowing all of them.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
This commit is contained in:
Erik Hollensbe
2014-10-27 17:38:24 +00:00
parent 80d35c7fd0
commit be49867cab
2 changed files with 88 additions and 1 deletions
+2 -1
View File
@@ -24,8 +24,9 @@ func (b *Builder) replaceEnv(str string) string {
continue
}
prefix := match[:idx]
stripped := match[idx+2:]
str = strings.Replace(str, match, "$"+stripped, -1)
str = strings.Replace(str, match, prefix+"$"+stripped, -1)
continue
}