Permalink
Browse files

fix(): bugfixes

  • Loading branch information...
jkuri committed Aug 2, 2017
1 parent c471e91 commit e7768d02b359fcebded18cbe50c078f858f35a45
Showing with 11 additions and 9 deletions.
  1. +9 −8 src/api/process.ts
  2. +2 −1 src/app/styles/terminal.sass
@@ -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('> ', '') });
}
});

@@ -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.