Просмотр исходного кода

fix: small tweak to support nushell (#1943)

Aiden Cline 6 месяцев назад
Родитель
Сommit
6eaaaffcdd
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      packages/opencode/src/session/index.ts

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

@@ -1062,10 +1062,8 @@ export namespace Session {
      eval "${input.command}"
    `
     const shell = process.env["SHELL"] ?? "bash"
-    const isFish = shell.includes("fish")
-    const args = isFish
-      ? ["-c", script] // fish with just -c
-      : ["-c", "-l", script]
+    const supportsLoginFlag = !shell.includes("fish") && !shell.includes("nu")
+    const args = supportsLoginFlag ? ["-c", "-l", script] : ["-c", script]
 
     const proc = spawn(shell, args, {
       cwd: app.path.cwd,