Permalink
Browse files

fix(console): fix console output

  • Loading branch information...
jkuri committed Aug 2, 2017
1 parent 426ce0b commit 612a98e3326ff4481cafd9a5c89f70d8ab7b2a5c
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/api/process.ts
@@ -77,11 +77,16 @@ function executeInContainer(name: string, command: string): Observable<ProcessOu
return;
}

if (data.includes('> read escape sequence')) {
return;
}

if (data.includes(command)) {
data = bold(yellow(command)) + '\n';
}

if (!data.trim().includes('logout') && !data.trim().includes('exit')) {
if (!data.trim().includes('logout') && !data.trim().includes('exit') &&
!data.trim().includes('read escape sequence')) {
observer.next({ type: 'data', data: data });
}
}
@@ -101,7 +106,6 @@ function executeInContainer(name: string, command: string): Observable<ProcessOu

function startContainer(name: string, image: string, vars = []): Observable<ProcessOutput> {
return new Observable(observer => {
console.log(vars);
const args = ['run', '--privileged', '-dit'].concat(vars).concat('--name', name, image);
const process = nodePty.spawn('docker', args);

0 comments on commit 612a98e

Please sign in to comment.