Kaynağa Gözat

fix: preserve process.env when spawning formatter commands (#1850)

Camden Clark 6 ay önce
ebeveyn
işleme
80b25c79bb
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      packages/opencode/src/format/index.ts

+ 1 - 1
packages/opencode/src/format/index.ts

@@ -71,7 +71,7 @@ export namespace Format {
         const proc = Bun.spawn({
         const proc = Bun.spawn({
           cmd: item.command.map((x) => x.replace("$FILE", file)),
           cmd: item.command.map((x) => x.replace("$FILE", file)),
           cwd: App.info().path.cwd,
           cwd: App.info().path.cwd,
-          env: item.environment,
+          env: { ...process.env, ...item.environment },
           stdout: "ignore",
           stdout: "ignore",
           stderr: "ignore",
           stderr: "ignore",
         })
         })