test: suppress stderr output in TerminalProcessExec tests

Redirect stderr to /dev/null when executing test commands to prevent
'command not found' messages from appearing in test output. This improves
test output readability while maintaining the same test functionality.

The test still verifies that nonexistent commands return exit code 127,
but does so without printing potentially confusing error messages.

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
This commit is contained in:
Eric Wheeler 2025-03-05 19:30:56 -08:00
parent 9f5a67ecf8
commit d25bcb1913

View file

@ -45,8 +45,8 @@ function createRealCommandStream(command: string): { stream: AsyncIterable<strin
let exitCode: number
try {
// Execute the command and get the real output
realOutput = execSync(command, {
// Execute the command and get the real output, redirecting stderr to /dev/null
realOutput = execSync(command + " 2>/dev/null", {
encoding: "utf8",
maxBuffer: 100 * 1024 * 1024, // Increase buffer size to 100MB
})