preserve process.env when spawning formatter commands #1258

Closed
opened 2026-02-16 17:30:11 -05:00 by yindo · 1 comment
Owner

Originally created by @CamdenClark on GitHub (Aug 12, 2025).

Originally assigned to: @thdxr on GitHub.

Repro case in opencode.json:

"custom-markdown-formatter": {
  "command": ["deno", "fmt", "$FILE"],
  "environment": {
    "NODE_ENV": "development"
  },
  "extensions": [".md"]
}

the NODE_ENV variable overrides the rest of process.env when spawning the formatter process. this leads to issues like bun not being available on the path.

Originally created by @CamdenClark on GitHub (Aug 12, 2025). Originally assigned to: @thdxr on GitHub. Repro case in opencode.json: ``` "custom-markdown-formatter": { "command": ["deno", "fmt", "$FILE"], "environment": { "NODE_ENV": "development" }, "extensions": [".md"] } ``` the `NODE_ENV` variable overrides the rest of process.env when spawning the formatter process. this leads to issues like `bun` not being available on the path.
yindo closed this issue 2026-02-16 17:30:11 -05:00
Author
Owner

@rekram1-node commented on GitHub (Aug 12, 2025):

Your fix was just released, mind closing issue?

@rekram1-node commented on GitHub (Aug 12, 2025): Your fix was just released, mind closing issue?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1258