mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Feature: auto-close controlled term windows on session exit
This commit is contained in:
parent
d64abdafad
commit
25857fb2de
1 changed files with 2 additions and 2 deletions
|
|
@ -517,8 +517,8 @@ final class TerminalLauncher {
|
||||||
// When called from Swift server, we need to construct the full command with tty-fwd
|
// When called from Swift server, we need to construct the full command with tty-fwd
|
||||||
// When called from Rust via socket, command is already pre-formatted
|
// When called from Rust via socket, command is already pre-formatted
|
||||||
let fullCommand: String = if command.contains("TTY_SESSION_ID=") {
|
let fullCommand: String = if command.contains("TTY_SESSION_ID=") {
|
||||||
// Command is pre-formatted from Rust, just add cd
|
// Command is pre-formatted from Rust, add cd and exit
|
||||||
"cd \"\(escapedDir)\" && \(command)"
|
"cd \"\(escapedDir)\" && \(command) && exit"
|
||||||
} else {
|
} else {
|
||||||
// Command is just the user command, need to add tty-fwd
|
// Command is just the user command, need to add tty-fwd
|
||||||
"cd \"\(escapedDir)\" && TTY_SESSION_ID=\"\(sessionId)\" \(ttyFwd) -- \(command) && exit"
|
"cd \"\(escapedDir)\" && TTY_SESSION_ID=\"\(sessionId)\" \(ttyFwd) -- \(command) && exit"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue