message: Simplify subproc startup, and don't call out to `stdbuf` unless on Linux, where it is pre-installed.
  [Fix
diff: @@ -62,9 +62,7 @@ export interface Subprocess {
  child: proc.ChildProcess;
  }
  -export interface EnvironmentVariables {
  - [key: string] : string
  -};
  +export interface EnvironmentVariables { [key: string]: string; }
  export interface ExecutionOptions {
  environment?: EnvironmentVariables;
  @@ -87,8 +85,7 @@ export function execute(command: string,
  args: string[],
  outputConsumer?: OutputConsumer | null,
  options?: ExecutionOptions): Subprocess {
  - let child: proc.ChildProcess | null = null;
  - const result = new Promise<ExecutionResult>((resolve, reject) => {
  + let child: proc.ChildProcess;
  if (options && options.silent !== true) {
  log.info('Executing command: '
  // We do simple quoting of arguments with spaces.
  @@ -112,13 +109,14 @@ export function execute(command: string,
  if (options && options.cwd) {
  spawn_opts.cwd = options.cwd;
  }
  - if (process.platform != 'win32') {
  + if (process.platform == 'linux') {
  // We wrap things in `stdbuf` to disable output buffering.
  const subargs = [ '-o', '0', '-e', '0' ].concat([ command ], args);
  child = proc.spawn('stdbuf', subargs, spawn_opts);
  } else {
  child = proc.spawn(command, args, spawn_opts);
  }
  + const result = new Promise<ExecutionResult>((resolve, reject) => {
  child.on('error', (err) => { reject(err); });
  let stdout_acc = '';
  let line_acc = '';
  @@ -168,6 +166,5 @@ export function execute(command: string,
  resolve({retc : retc, stdout : stdout_acc, stderr : stderr_acc});
  });
  });
  - console.assert(!!child, "Didn't start child?");
  - return {child : child !, result};
  + return {child, result};
  }
  