Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a08cb5b5
Commit
a08cb5b5
authored
Mar 08, 2018
by
Di Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include file name in the error when visiting files
parent
a0844c17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
2.original
.../testcase-apply-edit-last-applied-syntax-error/2.original
+1
-1
2.original
...ubectl/cmd/testdata/edit/testcase-syntax-error/2.original
+1
-1
visitor.go
pkg/kubectl/resource/visitor.go
+1
-1
No files found.
pkg/kubectl/cmd/testdata/edit/testcase-apply-edit-last-applied-syntax-error/2.original
View file @
a08cb5b5
# Please edit the 'last-applied-configuration' annotations below.
# 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
metadata:
...
...
pkg/kubectl/cmd/testdata/edit/testcase-syntax-error/2.original
View file @
a08cb5b5
...
...
@@ -2,7 +2,7 @@
# and an empty file will abort the edit. If an error occurs while saving this file will be
# 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
kind: Service
...
...
pkg/kubectl/resource/visitor.go
View file @
a08cb5b5
...
...
@@ -578,7 +578,7 @@ func (v *StreamVisitor) Visit(fn VisitorFunc) error {
if
err
==
io
.
EOF
{
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.
ext
.
Raw
=
bytes
.
TrimSpace
(
ext
.
Raw
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment