Merge pull request #4482 from chezsmithy/fix-stdout-terminal

fix(tools): Terminal command returns stdout but not stderr after error detected
This commit is contained in:
Nate Sesti 2025-03-15 18:02:37 -07:00 • committed by GitHub
commit 81c71d89ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,8 @@
import childProcess from "node:child_process";
import util from "node:util";
import { ToolImpl } from ".";
import { fileURLToPath } from "node:url";
import { ToolImpl } from ".";
const asyncExec = util.promisify(childProcess.exec);
@ -26,7 +26,7 @@ export const runTerminalCommandImpl: ToolImpl = async (args, extras) => {
{
name: "Terminal",
description: "Terminal command output",
content: error.stderr ?? error.toString(),
content: error.stderr || error.stdout || error.toString(),
},
];
}