Skip to content

Commit

Permalink
Merge pull request #19 from SongStitch/fix/comment-on-first-line
Browse files Browse the repository at this point in the history
fix: issue stripping comments on the first line of the dockerfile template
  • Loading branch information
BradLewis authored May 21, 2024
2 parents 28785ec + 2c6e928 commit 4fbd59e
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 4fbd59e

Please sign in to comment.