fix(Shell): fix shell version printing

This commit is contained in:
李通洲
2023-07-02 10:56:28 +08:00
parent ad3b7762a3
commit 23c8937362
+7 -1
View File
@@ -40,11 +40,17 @@ static bool getFileVersion(const char* exePath, FFstrbuf* version)
static bool getExeVersionRaw(FFstrbuf* exe, FFstrbuf* version)
{
return ffProcessAppendStdOut(version, (char* const[]) {
bool ok = ffProcessAppendStdOut(version, (char* const[]) {
exe->chars,
"--version",
NULL
}) == NULL;
if (ok)
{
ffStrbufTrim(version, '\n');
ffStrbufTrim(version, ' ');
}
return ok;
}
static bool getExeVersionGeneral(FFstrbuf* exe, FFstrbuf* version)