From 2c6e928352bce0a41e9370ee433a38aecfb352fa Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Mon, 20 May 2024 19:49:10 -0400 Subject: [PATCH] fix: issue stripping comments on the first line of the dockerfile template --- docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker.go b/docker.go index 894d41e..d3e0f42 100644 --- a/docker.go +++ b/docker.go @@ -37,7 +37,7 @@ func WriteDockerfile( lines []string, ) int { // this allows us to maintain things like comments and newlines in the original Dockerfile - if currentLine != 0 && node.StartLine != 0 && currentLine < node.StartLine { + if node.StartLine != 0 && currentLine < node.StartLine { for i := currentLine + 1; i < node.StartLine; i++ { builder.WriteString(lines[i-1]) builder.WriteString("\n")