Merge pull request #444 from mslacken/fix-remove

Fix removal of values
This commit is contained in:
Gregory M. Kurtzer
2022-06-08 12:09:05 -07:00
committed by GitHub

View File

@@ -4,6 +4,8 @@ import (
"fmt"
"regexp"
"strings"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
)
/**********
@@ -55,8 +57,9 @@ func (ent *Entry) Set(val string) {
return
}
if val == "UNDEF" || val == "DELETE" || val == "UNSET" || val == "--" {
ent.value = []string{}
if val == "UNDEF" || val == "DELETE" || val == "UNSET" || val == "--" || val == "nil" {
wwlog.Debug("Removing value for %v\n", *ent)
ent.value = []string{""}
} else {
ent.value = []string{val}
}