From 4de46fbab360f4e196469be2b106e8965f2931c4 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 27 Nov 2025 00:13:06 +0100 Subject: [PATCH] fix: suppress stderr in execSync calls to prevent TUI corruption Added stdio: 'pipe' to all execSync calls in fuzzy file search to prevent stderr output from fd/fdfind command checks from corrupting TUI rendering. --- packages/tui/src/autocomplete.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/tui/src/autocomplete.ts b/packages/tui/src/autocomplete.ts index 97f11586..d4065282 100644 --- a/packages/tui/src/autocomplete.ts +++ b/packages/tui/src/autocomplete.ts @@ -536,6 +536,7 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider { encoding: "utf-8", timeout: 2000, maxBuffer: 1024 * 1024, + stdio: ["pipe", "pipe", "pipe"], }); } else { // Fallback to find @@ -576,6 +577,7 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider { timeout: 3000, maxBuffer: 1024 * 1024, shell: "/bin/bash", + stdio: ["pipe", "pipe", "pipe"], }); } @@ -642,12 +644,12 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider { } try { - execSync("fdfind --version", { encoding: "utf-8", timeout: 1000 }); + execSync("fdfind --version", { encoding: "utf-8", timeout: 1000, stdio: "pipe" }); this.fdCommand = "fdfind"; return this.fdCommand; } catch { try { - execSync("fd --version", { encoding: "utf-8", timeout: 1000 }); + execSync("fd --version", { encoding: "utf-8", timeout: 1000, stdio: "pipe" }); this.fdCommand = "fd"; return this.fdCommand; } catch {