From ce864b88dfbfc085c220287457688ff235bdd5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 20 Jun 2023 09:29:58 +0800 Subject: [PATCH] Fastfetch: don't print modules in `config.jsonc` if `--structure` is specified Good for testing --- src/fastfetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fastfetch.c b/src/fastfetch.c index 2efa6fcf3..bdb84bdfb 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -1183,7 +1183,7 @@ int main(int argc, const char** argv) parseConfigFiles(&instance, &data); parseArguments(&instance, &data, argc, argv); - if(!instance.state.configDoc) + if(data.structure.length > 0 || !instance.state.configDoc) { //If we don't have a custom structure, use the default one if(data.structure.length == 0) @@ -1208,7 +1208,7 @@ int main(int argc, const char** argv) if (!instance.config.noBuffer) fflush(stdout); #endif - if (instance.state.configDoc) + if (data.structure.length == 0 && instance.state.configDoc) { ffPrintJsonConfig(&instance); }