Skip to content

Commit ba3e91d

Browse files
fix: write json output to stdout so it can be piped
Signed-off-by: Rahul Vishwakarma <rahulvs2809@gmail.com>
1 parent fdf72b8 commit ba3e91d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/archivistactl/cmd/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Digests are expected to be in the form algorithm:digest, for instance: sha256:45
6363
if err != nil {
6464
return fmt.Errorf("failed to marshal results to JSON: %w", err)
6565
}
66-
cmd.Println(string(jsonData))
66+
fmt.Fprintln(cmd.OutOrStdout(), string(jsonData))
6767
return nil
6868
}
6969

0 commit comments

Comments
 (0)