Skip to content

Commit

Permalink
fix(console): fix console output
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Aug 2, 2017
1 parent 426ce0b commit 612a98e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/api/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}
Expand All @@ -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);

Expand Down

0 comments on commit 612a98e

Please sign in to comment.