We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c78241e commit 924fa79Copy full SHA for 924fa79
src/hooks/non-interactive-env/index.ts
@@ -34,13 +34,16 @@ function shellEscape(value: string): string {
34
}
35
36
/**
37
- * Build env prefix string: VAR1=val1 VAR2=val2 ...
+ * Build env prefix string with line continuation for readability:
38
+ * VAR1=val1 \
39
+ * VAR2=val2 \
40
+ * ...
41
* OpenCode's bash tool ignores args.env, so we must prepend to command.
42
*/
43
function buildEnvPrefix(env: Record<string, string>): string {
44
return Object.entries(env)
45
.map(([key, value]) => `${key}=${shellEscape(value)}`)
- .join(" ")
46
+ .join(" \\\n")
47
48
49
export function createNonInteractiveEnvHook(_ctx: PluginInput) {
0 commit comments