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:
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user