Skip to content

Commit e487690

Browse files
committed
Open a login shell in /run. Use the shell from env["SHELL"]
1 parent 0bb28e3 commit e487690

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Core/Sources/ChatPlugins/TerminalChatPlugin.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ public actor TerminalChatPlugin: ChatPlugin {
4343

4444
if isCancelled { throw CancellationError() }
4545

46+
let env = ProcessInfo.processInfo.environment
47+
let shell = env["SHELL"] ?? "/bin/bash"
48+
4649
let output = terminal.streamCommand(
47-
"/bin/bash",
48-
arguments: ["-c", content],
50+
shell,
51+
arguments: ["-l", "-c", content],
4952
currentDirectoryPath: projectURL?.path ?? fileURL.path,
5053
environment: [
5154
"PROJECT_ROOT": projectURL?.path ?? fileURL.path,

0 commit comments

Comments
 (0)