Fix newline handling in file, softlink, and ImportLink template functions
Use state-based routing instead of sentinel strings, so whitespace-trimming
syntax (e.g. `{{- file "name" -}}`) correctly creates all named files and
symlinks.
Fixes: #2118
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
Co-authored-by: Christian Goll <cgoll@suse.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -60,7 +60,6 @@ func Test_wickedOverlay(t *testing.T) {
|
||||
const expected_log string = `backupFile: true
|
||||
writeFile: true
|
||||
Filename: default
|
||||
|
||||
# This file is autogenerated by warewulf
|
||||
auto wwnet0
|
||||
allow-hotplug wwnet0
|
||||
@@ -69,7 +68,6 @@ iface wwnet0 inet static
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.3.1
|
||||
mtu 1500
|
||||
|
||||
backupFile: true
|
||||
writeFile: true
|
||||
Filename: secondary
|
||||
|
||||
Reference in New Issue
Block a user