Skip to content

Commit

Permalink
fix(): bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Aug 2, 2017
1 parent c471e91 commit e7768d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
17 changes: 9 additions & 8 deletions src/api/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@ function executeInContainer(name: string, command: string): Observable<ProcessOu
const trimmed = data.trim();

if (!executed) {
attach.write(command + ' && echo EXECOK || echo EXECNOK\r');
observer.next({ type: 'data', data: bold(yellow(command)) + '\r' });
executed = true;
attach.write(command + ' && echo EXECOK || echo EXECNOK\r\n');
observer.next({ type: 'data', data: bold(yellow(command)) + '\r\n' });
} else if (data.includes('EXECOK') && !data.includes(command)) {
} else if (trimmed.startsWith('EXECOK')) {
exitCode = 0;
attach.write(detachKey ? detachKey : 'exit $?\r\n');
} else if (data.includes('EXECNOK') && !data.includes(command)) {
attach.write(detachKey ? detachKey : 'exit $?\r\n');
} else if (!data.includes(command)) {
observer.next({ type: 'data', data: data });
attach.write(detachKey ? detachKey : 'exit $?\r');
} else if (trimmed.startsWith('EXECNOK')) {
attach.write(detachKey ? detachKey : 'exit $?\r');
} else if (!data.includes(command) && !data.includes('exit $?') &&
!data.includes('logout') && !data.includes('read escape sequence')) {
observer.next({ type: 'data', data: data.replace('> ', '') });
}
});

Expand Down
3 changes: 2 additions & 1 deletion src/app/styles/terminal.sass
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
border-radius: 4px
box-shadow: 1px 2px 10px rgba($background, 0.7)
border: 1px solid $divider
overflow: hidden
overflow-x: hidden
overflow-y: scroll

&.large
height: 700px

0 comments on commit e7768d0

Please sign in to comment.