From 3d3eaf3034259f4ec3019c7b39719ab2872118a1 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Sun, 22 Dec 2019 17:16:03 +1100 Subject: [PATCH] Return path, smart print --- yq.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yq.go b/yq.go index becedccd..ed6a1e62 100644 --- a/yq.go +++ b/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)