Skip to content

Commit 789f1e3

Browse files
committed
Fastfetch: don't mess output with --stat in --pipe mode
1 parent 9c09596 commit 789f1e3

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/common/commandoption.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,7 @@ void ffPrintCommandOption(FFdata* data, yyjson_mut_doc* jsonDoc)
130130
{
131131
char str[32];
132132
int len = snprintf(str, sizeof str, "%" PRIu64 "ms", ms);
133-
if(instance.config.display.pipe)
134-
puts(str);
135-
else
136-
printf("\033[s\033[1A\033[9999999C\033[%dD%s\033[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
133+
printf("\033[s\033[1A\033[9999999C\033[%dD%s\033[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
137134
}
138135
}
139136

src/common/jsonconfig.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,7 @@ static const char* printJsonConfig(bool prepare, yyjson_mut_doc* jsonDoc)
213213
{
214214
char str[32];
215215
int len = snprintf(str, sizeof str, "%" PRIu64 "ms", ms);
216-
if(instance.config.display.pipe)
217-
puts(str);
218-
else
219-
printf("\033[s\033[1A\033[9999999C\033[%dD%s\033[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
216+
printf("\033[s\033[1A\033[9999999C\033[%dD%s\033[u", len, str); // Save; Up 1; Right 9999999; Left <len>; Print <str>; Load
220217
}
221218
}
222219

0 commit comments

Comments
 (0)