mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
Merge pull request #4497 from m-Bilal/fix-3812
Fix 3812; Error message changed and check for MalformedYamlError
This commit is contained in:
@@ -294,7 +294,7 @@ func (r *ByteReader) decode(originalYAML string, index int, decoder *yaml.Decode
|
||||
return nil, io.EOF
|
||||
}
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err)
|
||||
return nil, errors.WrapPrefixf(err, "MalformedYAMLError")
|
||||
}
|
||||
|
||||
if yaml.IsYNodeEmptyDoc(node) {
|
||||
|
||||
@@ -673,7 +673,7 @@ apiVersion: example.com/v1beta1
|
||||
`
|
||||
|
||||
_, err := FormatInput(strings.NewReader(y))
|
||||
assert.EqualError(t, err, "yaml: line 15: found character that cannot start any token")
|
||||
assert.EqualError(t, err, "MalformedYAMLError: yaml: line 15: found character that cannot start any token")
|
||||
}
|
||||
|
||||
// TestFormatFileOrDirectory_yamlExtFile verifies that FormatFileOrDirectory will format a file
|
||||
|
||||
Reference in New Issue
Block a user