Permalink
Browse files

fix(terminal): fix terminal output

  • Loading branch information...
jkuri committed Aug 2, 2017
1 parent 07e988c commit f02d00491b30fc3bd33ce60d0e2a420a71a89ff5
Showing with 4 additions and 3 deletions.
  1. +1 −1 src/api/process-manager.ts
  2. +3 −2 src/api/process.ts
@@ -275,7 +275,7 @@ export function startJob(buildId: number, jobId: number): Promise<void> {
.skip(1)
.subscribe(event => {
terminalEvents.next(event);
if (event.data) {
if (event.data && event.type === 'data') {
process.log.push(event.data);
procs[procIndex] = process;
jobProcesses.next(procs);
@@ -52,7 +52,8 @@ export function startBuildProcess(buildId: number, jobId: number,

function executeInContainer(name: string, command: string, vars = []): Observable<ProcessOutput> {
return new Observable(observer => {
const args = ['exec', '--privileged', '-it']
const args = ['exec', '--privileged']
.concat(command.startsWith('sudo') ? '-i' : '-it')
.concat(vars)
.concat(name, 'bash', '-l', '-c', `'${command}'`);
const process = pty.spawn('docker', [args.join(' ')], { shell: true });
@@ -72,7 +73,7 @@ function executeInContainer(name: string, command: string, vars = []): Observabl

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

process.on('exit', exitCode => {

0 comments on commit f02d004

Please sign in to comment.