From 7a6999bd20cb05fbfd57e313afbc2b733b9fb4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 9 Mar 2024 12:07:07 +0800 Subject: [PATCH] Fastfetch: print final new line in `--format json` --- src/fastfetch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fastfetch.c b/src/fastfetch.c index 07220e0ba..7a8f8d7ff 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -824,7 +824,10 @@ static void run(FFdata* data) ffPrintCommandOption(data, instance.state.resultDoc); if (instance.state.resultDoc) + { yyjson_mut_write_fp(stdout, instance.state.resultDoc, YYJSON_WRITE_INF_AND_NAN_AS_NULL | YYJSON_WRITE_PRETTY_TWO_SPACES, NULL, NULL); + putchar('\n'); + } else ffFinish(); }