mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 06:04:15 +00:00
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.
This commit is contained in:
parent
c2db2f9f4a
commit
4de46fbab3
1 changed files with 4 additions and 2 deletions
|
|
@ -536,6 +536,7 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider {
|
||||||
encoding: "utf-8",
|
encoding: "utf-8",
|
||||||
timeout: 2000,
|
timeout: 2000,
|
||||||
maxBuffer: 1024 * 1024,
|
maxBuffer: 1024 * 1024,
|
||||||
|
stdio: ["pipe", "pipe", "pipe"],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Fallback to find
|
// Fallback to find
|
||||||
|
|
@ -576,6 +577,7 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider {
|
||||||
timeout: 3000,
|
timeout: 3000,
|
||||||
maxBuffer: 1024 * 1024,
|
maxBuffer: 1024 * 1024,
|
||||||
shell: "/bin/bash",
|
shell: "/bin/bash",
|
||||||
|
stdio: ["pipe", "pipe", "pipe"],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -642,12 +644,12 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
execSync("fdfind --version", { encoding: "utf-8", timeout: 1000 });
|
execSync("fdfind --version", { encoding: "utf-8", timeout: 1000, stdio: "pipe" });
|
||||||
this.fdCommand = "fdfind";
|
this.fdCommand = "fdfind";
|
||||||
return this.fdCommand;
|
return this.fdCommand;
|
||||||
} catch {
|
} catch {
|
||||||
try {
|
try {
|
||||||
execSync("fd --version", { encoding: "utf-8", timeout: 1000 });
|
execSync("fd --version", { encoding: "utf-8", timeout: 1000, stdio: "pipe" });
|
||||||
this.fdCommand = "fd";
|
this.fdCommand = "fd";
|
||||||
return this.fdCommand;
|
return this.fdCommand;
|
||||||
} catch {
|
} catch {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue