Shell: fixes xonsh version detection

This commit is contained in:
李通洲
2026-01-09 16:12:56 +08:00
parent 30ea52938e
commit 1337525eb5
+3 -2
View File
@@ -204,13 +204,14 @@ static bool getShellVersionAsh(FFstrbuf* exe, FFstrbuf* version)
return true;
}
static bool getShellVersionXonsh(FFstrbuf* exe, FFstrbuf* version)
static bool getShellVersionXonsh(FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version)
{
ffStrbufSetS(version, getenv("XONSH_VERSION"));
if (version->length) return true;
// exe is python here
if(ffProcessAppendStdErr(version, (char* const[]) {
exe->chars,
"xonsh",
"--version",
NULL
}) != NULL)