Skip to content

Commit 158f4d7

Browse files
Use source instead of bash for startup scripts
source /dev/stdin executes in the current shell so exports persist for subsequent commands (like the Claude invocation).
1 parent 643011e commit 158f4d7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/terminal/task-terminal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ export function TaskTerminal({ taskName, cwd, className, aiMode, description, st
314314
const { startupScript: currentStartupScript, aiMode: currentAiMode, description: currentDescription, taskName: currentTaskName, serverPort: currentServerPort } = pendingStartup
315315

316316
// 1. Run startup script first (e.g., mise trust, mkdir .vibora, export VIBORA_DIR)
317-
// Wrap in heredoc so it executes as a single script (supports shebangs)
317+
// Use source with heredoc so exports persist in the current shell
318318
if (currentStartupScript) {
319319
setTimeout(() => {
320-
const wrappedScript = `bash <<'VIBORA_STARTUP'\n${currentStartupScript}\nVIBORA_STARTUP`
320+
const wrappedScript = `source /dev/stdin <<'VIBORA_STARTUP'\n${currentStartupScript}\nVIBORA_STARTUP`
321321
writeToTerminalRef.current(actualTerminalId, wrappedScript + '\r')
322322
}, 100)
323323
}

0 commit comments

Comments
 (0)