Skip to content

Commit 23c8937

Browse files
committed
fix(Shell): fix shell version printing
1 parent ad3b776 commit 23c8937

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/detection/terminalshell/terminalshell.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ static bool getFileVersion(const char* exePath, FFstrbuf* version)
4040

4141
static bool getExeVersionRaw(FFstrbuf* exe, FFstrbuf* version)
4242
{
43-
return ffProcessAppendStdOut(version, (char* const[]) {
43+
bool ok = ffProcessAppendStdOut(version, (char* const[]) {
4444
exe->chars,
4545
"--version",
4646
NULL
4747
}) == NULL;
48+
if (ok)
49+
{
50+
ffStrbufTrim(version, '\n');
51+
ffStrbufTrim(version, ' ');
52+
}
53+
return ok;
4854
}
4955

5056
static bool getExeVersionGeneral(FFstrbuf* exe, FFstrbuf* version)

0 commit comments

Comments
 (0)