mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
include file name in the error when visiting files
This commit is contained in:
parent
a0844c17bf
commit
a08cb5b531
@ -1,7 +1,7 @@
|
|||||||
# Please edit the 'last-applied-configuration' annotations below.
|
# Please edit the 'last-applied-configuration' annotations below.
|
||||||
# Lines beginning with a '#' will be ignored, and an empty file will abort the edit.
|
# Lines beginning with a '#' will be ignored, and an empty file will abort the edit.
|
||||||
#
|
#
|
||||||
# The edited file had a syntax error: error converting YAML to JSON: yaml: line 12: could not find expected ':'
|
# The edited file had a syntax error: error parsing edited-file: error converting YAML to JSON: yaml: line 12: could not find expected ':'
|
||||||
#
|
#
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# and an empty file will abort the edit. If an error occurs while saving this file will be
|
# and an empty file will abort the edit. If an error occurs while saving this file will be
|
||||||
# reopened with the relevant failures.
|
# reopened with the relevant failures.
|
||||||
#
|
#
|
||||||
# The edited file had a syntax error: error converting YAML to JSON: yaml: line 17: could not find expected ':'
|
# The edited file had a syntax error: error parsing edited-file: error converting YAML to JSON: yaml: line 17: could not find expected ':'
|
||||||
#
|
#
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
@ -578,7 +578,7 @@ func (v *StreamVisitor) Visit(fn VisitorFunc) error {
|
|||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return err
|
return fmt.Errorf("error parsing %s: %v", v.Source, err)
|
||||||
}
|
}
|
||||||
// TODO: This needs to be able to handle object in other encodings and schemas.
|
// TODO: This needs to be able to handle object in other encodings and schemas.
|
||||||
ext.Raw = bytes.TrimSpace(ext.Raw)
|
ext.Raw = bytes.TrimSpace(ext.Raw)
|
||||||
|
Loading…
Reference in New Issue
Block a user