Skip to content

Commit 8b40675

Browse files
authored
Merge pull request #4381 from jandubois/bootcmds
Don't trim whitespace from boot commands
2 parents 5f767cb + 3e31275 commit 8b40675

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pkg/cidata/cidata.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,7 @@ func getBootCmds(p []limatype.Provision) []BootCmds {
489489
var bootCmds []BootCmds
490490
for _, f := range p {
491491
if f.Mode == limatype.ProvisionModeBoot {
492-
lines := []string{}
493-
for line := range strings.SplitSeq(*f.Script, "\n") {
494-
if line == "" {
495-
continue
496-
}
497-
lines = append(lines, strings.TrimSpace(line))
498-
}
499-
bootCmds = append(bootCmds, BootCmds{Lines: lines})
492+
bootCmds = append(bootCmds, BootCmds{Lines: strings.Split(*f.Script, "\n")})
500493
}
501494
}
502495
return bootCmds

0 commit comments

Comments
 (0)