mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-14 07:08:06 +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
|
return nil, err
|
||||||
}
|
}
|
||||||
parsedNode, err := decoder.Decode()
|
parsedNode, err := decoder.Decode()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
if len(parsedNode.Node.Content) == 0 {
|
if len(parsedNode.Node.Content) == 0 {
|
||||||
return nil, fmt.Errorf("bad data")
|
return nil, fmt.Errorf("bad data")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user