mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
fix lib.go handled error (#1418)
This commit is contained in:
parent
bd5e5dc965
commit
91b3fb2af3
@ -263,6 +263,9 @@ func parseSnippet(value string) (*yaml.Node, error) {
|
||||
return nil, err
|
||||
}
|
||||
parsedNode, err := decoder.Decode()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(parsedNode.Node.Content) == 0 {
|
||||
return nil, fmt.Errorf("bad data")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user