mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
add source filename in error message
This commit is contained in:
parent
13ae40681a
commit
6b79dcaa4d
@ -39,7 +39,7 @@ type Mapper struct {
|
||||
func (m *Mapper) InfoForData(data []byte, source string) (*Info, error) {
|
||||
json, err := yaml.ToJSON(data)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to parse %q: %v", err)
|
||||
return nil, fmt.Errorf("unable to parse %q: %v", source, err)
|
||||
}
|
||||
data = json
|
||||
version, kind, err := m.DataVersionAndKind(data)
|
||||
|
Loading…
Reference in New Issue
Block a user