From 3e31275adf42a51595134c6833586fdec8007a44 Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Thu, 20 Nov 2025 11:30:06 -0800 Subject: [PATCH] Don't trim whitespace from boot commands It breaks here-docs. The original code was likely copied from the getCert() function above, but skipping empty lines and stripping whitespace is not appropriate for a shell script. Signed-off-by: Jan Dubois --- pkg/cidata/cidata.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkg/cidata/cidata.go b/pkg/cidata/cidata.go index dbc88316619..ab5a92ec1d5 100644 --- a/pkg/cidata/cidata.go +++ b/pkg/cidata/cidata.go @@ -489,14 +489,7 @@ func getBootCmds(p []limatype.Provision) []BootCmds { var bootCmds []BootCmds for _, f := range p { if f.Mode == limatype.ProvisionModeBoot { - lines := []string{} - for line := range strings.SplitSeq(*f.Script, "\n") { - if line == "" { - continue - } - lines = append(lines, strings.TrimSpace(line)) - } - bootCmds = append(bootCmds, BootCmds{Lines: lines}) + bootCmds = append(bootCmds, BootCmds{Lines: strings.Split(*f.Script, "\n")}) } } return bootCmds