mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
fix lib.go handled error (#1418)
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user