mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 05:38:04 +00:00
Return path, smart print
This commit is contained in:
parent
4fb44dbc47
commit
3d3eaf3034
2
yq.go
2
yq.go
@ -313,7 +313,7 @@ func printResults(matchingNodes []yqlib.MatchingNode, cmd *cobra.Command) error
|
||||
|
||||
for _, mappedDoc := range matchingNodes {
|
||||
if mappedDoc.Node.Kind == yaml.ScalarNode {
|
||||
cmd.Println(mappedDoc.Node.Value)
|
||||
cmd.Print(mappedDoc.Node.Value)
|
||||
} else {
|
||||
var encoder = yaml.NewEncoder(cmd.OutOrStdout())
|
||||
encoder.SetIndent(2)
|
||||
|
Loading…
Reference in New Issue
Block a user