fix(non-interactive-env): inherit process.env before applying NON_INTERACTIVE_ENV overrides

Previously, the hook only set NON_INTERACTIVE_ENV without inheriting the parent process environment, causing subprocess to run without proper PATH and other env vars. Now it properly inherits process.env first, then applies GIT_EDITOR=":" and EDITOR=":" to prevent interactive editors from spawning.

🤖 Generated with assistance of OhMyOpenCode
https://github.com/code-yeongyu/oh-my-opencode
This commit is contained in:
YeonGyu-Kim
2026-01-02 16:03:48 +09:00
parent 9a92dc8d95
commit b98a1b28f8

View File

@@ -35,6 +35,7 @@ export function createNonInteractiveEnvHook(_ctx: PluginInput) {
} }
output.args.env = { output.args.env = {
...process.env,
...(output.args.env as Record<string, string> | undefined), ...(output.args.env as Record<string, string> | undefined),
...NON_INTERACTIVE_ENV, ...NON_INTERACTIVE_ENV,
} }