Skip to content

Commit 8715af4

Browse files
committed
bin/xbps-query: make --json compact if there is no indention
1 parent 69aa731 commit 8715af4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

bin/xbps-query/list.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ list_pkgdb(struct xbps_handle *xhp, int (*filter)(xbps_object_t), const char *fo
174174
int r;
175175
if (json > 0) {
176176
pr.indent = (json-1) * 2;
177+
pr.compact = pr.indent == 0;
177178
pr.file = stdout;
178179
ctx.json = ≺
179180
} else if (format) {

0 commit comments

Comments
 (0)