From 595a2414b133d66922e279abf87e5e2cb5a0e69c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 17 Sep 2024 16:48:58 +0200 Subject: [PATCH] fix: if you exit a container manually, it should close the underlying tty as well --- resources/views/livewire/project/shared/terminal.blade.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/views/livewire/project/shared/terminal.blade.php b/resources/views/livewire/project/shared/terminal.blade.php index 31887120d..3c485c286 100644 --- a/resources/views/livewire/project/shared/terminal.blade.php +++ b/resources/views/livewire/project/shared/terminal.blade.php @@ -118,9 +118,8 @@ socket.send(JSON.stringify({ message: data })); - // Type CTRL + D or exit in the terminal - if (data === '\x04' || (data === '\r' && stripAnsiCommands(commandBuffer).trim() === 'exit')) { + if (data === '\x04' || (data === '\r' && stripAnsiCommands(commandBuffer).trim().includes('exit'))) { checkIfProcessIsRunningAndKillIt(); setTimeout(() => { $data.terminalActive = false; @@ -215,8 +214,8 @@ term.resize(termWidth, termHeight); socket.send(JSON.stringify({ resize: { - cols: 600, - rows: 600 + cols: termWidth, + rows: termHeight } })); }