From 1337525eb58a075eb3bb97395ea08dafc7bea1e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 9 Jan 2026 16:12:56 +0800 Subject: [PATCH] Shell: fixes xonsh version detection --- src/detection/terminalshell/terminalshell.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detection/terminalshell/terminalshell.c b/src/detection/terminalshell/terminalshell.c index dce77020e..8f15e9e1b 100644 --- a/src/detection/terminalshell/terminalshell.c +++ b/src/detection/terminalshell/terminalshell.c @@ -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)