Change regex back to nil comparison, because the encoding/yaml package parses YAML properly and so should be nil

reviewable/pr2648/r5
Scott Rigby 8 years ago
parent 67c5129e51
commit 88897da954

@ -21,7 +21,6 @@ import (
"io"
"io/ioutil"
"log"
"regexp"
"strings"
"github.com/ghodss/yaml"
@ -283,13 +282,10 @@ func coalesceValues(c *chart.Chart, v map[string]interface{}) (map[string]interf
// This allows Helm's various sources of values (value files or --set) to
// remove incompatible keys from any previous chart, file, or set values.
// ref: http://www.yaml.org/spec/1.2/spec.html#id2803362
var nullPattern = regexp.MustCompile("^(?:null|Null|NULL|~)$")
if str, ok := val.(string); ok {
if nullPattern.MatchString(str) {
if val == nil {
delete(v, key)
continue
}
}
if _, ok := v[key]; !ok {
// If the key is not in v, copy it from nv.

Loading…
Cancel
Save