Skip to content

Commit e7768d0

Browse files
committed
fix(): bugfixes
1 parent c471e91 commit e7768d0

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/api/process.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,17 @@ function executeInContainer(name: string, command: string): Observable<ProcessOu
7575
const trimmed = data.trim();
7676

7777
if (!executed) {
78+
attach.write(command + ' && echo EXECOK || echo EXECNOK\r');
79+
observer.next({ type: 'data', data: bold(yellow(command)) + '\r' });
7880
executed = true;
79-
attach.write(command + ' && echo EXECOK || echo EXECNOK\r\n');
80-
observer.next({ type: 'data', data: bold(yellow(command)) + '\r\n' });
81-
} else if (data.includes('EXECOK') && !data.includes(command)) {
81+
} else if (trimmed.startsWith('EXECOK')) {
8282
exitCode = 0;
83-
attach.write(detachKey ? detachKey : 'exit $?\r\n');
84-
} else if (data.includes('EXECNOK') && !data.includes(command)) {
85-
attach.write(detachKey ? detachKey : 'exit $?\r\n');
86-
} else if (!data.includes(command)) {
87-
observer.next({ type: 'data', data: data });
83+
attach.write(detachKey ? detachKey : 'exit $?\r');
84+
} else if (trimmed.startsWith('EXECNOK')) {
85+
attach.write(detachKey ? detachKey : 'exit $?\r');
86+
} else if (!data.includes(command) && !data.includes('exit $?') &&
87+
!data.includes('logout') && !data.includes('read escape sequence')) {
88+
observer.next({ type: 'data', data: data.replace('> ', '') });
8889
}
8990
});
9091

src/app/styles/terminal.sass

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
border-radius: 4px
1212
box-shadow: 1px 2px 10px rgba($background, 0.7)
1313
border: 1px solid $divider
14-
overflow: hidden
14+
overflow-x: hidden
15+
overflow-y: scroll
1516

1617
&.large
1718
height: 700px

0 commit comments

Comments
 (0)