Browse Source

fix: bash should hide stdout from zshrc (#1909)

Aiden Cline 6 months ago
parent
commit
118617473e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      packages/opencode/src/session/index.ts

+ 4 - 4
packages/opencode/src/session/index.ts

@@ -1051,10 +1051,10 @@ export namespace Session {
     await updatePart(part)
     await updatePart(part)
     const app = App.info()
     const app = App.info()
     const script = `
     const script = `
-    [[ -f ~/.zshrc ]] && source ~/.zshrc 2>/dev/null || true
-    [[ -f ~/.bashrc ]] && source ~/.bashrc 2>/dev/null || true
-    eval "${input.command}"
-  `
+     [[ -f ~/.zshrc ]] && source ~/.zshrc >/dev/null 2>&1 || true
+     [[ -f ~/.bashrc ]] && source ~/.bashrc >/dev/null 2>&1 || true
+     eval "${input.command}"
+   `
     const proc = spawn(process.env["SHELL"] ?? "bash", ["-c", "-l", script], {
     const proc = spawn(process.env["SHELL"] ?? "bash", ["-c", "-l", script], {
       cwd: app.path.cwd,
       cwd: app.path.cwd,
       signal: abort.signal,
       signal: abort.signal,