Skip to content

Commit

Permalink
fix: issue stripping comments on the first line of the dockerfile tem…
Browse files Browse the repository at this point in the history
…plate
  • Loading branch information
BradLewis committed May 20, 2024
1 parent 28785ec commit 2c6e928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 2c6e928

Please sign in to comment.