fix(atlas): capture stderr from git commands to prevent help text leak
When git commands fail (e.g., not in a repo, invalid HEAD), git outputs help text to stderr. Without explicit stdio option, execSync inherits the parent's stdio causing help text to appear on terminal during delegate_task execution. Add stdio: ['pipe', 'pipe', 'pipe'] to capture stderr instead of letting it leak to terminal.
This commit is contained in:
parent
afbdf69037
commit
599fad0e86
@ -274,6 +274,7 @@ function getGitDiffStats(directory: string): GitFileStat[] {
|
|||||||
cwd: directory,
|
cwd: directory,
|
||||||
encoding: "utf-8",
|
encoding: "utf-8",
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
|
stdio: ["pipe", "pipe", "pipe"],
|
||||||
}).trim()
|
}).trim()
|
||||||
|
|
||||||
if (!output) return []
|
if (!output) return []
|
||||||
@ -282,6 +283,7 @@ function getGitDiffStats(directory: string): GitFileStat[] {
|
|||||||
cwd: directory,
|
cwd: directory,
|
||||||
encoding: "utf-8",
|
encoding: "utf-8",
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
|
stdio: ["pipe", "pipe", "pipe"],
|
||||||
}).trim()
|
}).trim()
|
||||||
|
|
||||||
const statusMap = new Map<string, "modified" | "added" | "deleted">()
|
const statusMap = new Map<string, "modified" | "added" | "deleted">()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user