Browse Source

fix(format): set stdin/stdout/stderr to ignore for formatter subprocesses

ChildProcess.make defaults to "pipe" for all stdio streams. Formatters
that wait on stdin EOF or write enough output to fill pipe buffers would
hang. Matches the original Process.spawn behavior.
Kit Langton 3 weeks ago
parent
commit
8a5a6852ca
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/opencode/src/format/index.ts

+ 3 - 0
packages/opencode/src/format/index.ts

@@ -114,6 +114,9 @@ export namespace Format {
                       cwd: Instance.directory,
                       env: item.environment,
                       extendEnv: true,
+                      stdin: "ignore",
+                      stdout: "ignore",
+                      stderr: "ignore",
                     }),
                   )
                   .pipe(