Skip to content

Commit 595a241

Browse files
committed
fix: if you exit a container manually, it should close the underlying tty as well
1 parent 07ed726 commit 595a241

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

resources/views/livewire/project/shared/terminal.blade.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,8 @@ function flowControlCallback() {
118118
socket.send(JSON.stringify({
119119
message: data
120120
}));
121-
122121
// Type CTRL + D or exit in the terminal
123-
if (data === '\x04' || (data === '\r' && stripAnsiCommands(commandBuffer).trim() === 'exit')) {
122+
if (data === '\x04' || (data === '\r' && stripAnsiCommands(commandBuffer).trim().includes('exit'))) {
124123
checkIfProcessIsRunningAndKillIt();
125124
setTimeout(() => {
126125
$data.terminalActive = false;
@@ -215,8 +214,8 @@ function checkIfProcessIsRunningAndKillIt() {
215214
term.resize(termWidth, termHeight);
216215
socket.send(JSON.stringify({
217216
resize: {
218-
cols: 600,
219-
rows: 600
217+
cols: termWidth,
218+
rows: termHeight
220219
}
221220
}));
222221
}

0 commit comments

Comments
 (0)