public static function liveExecute( $command, OutputInterface $output, $directory = null, $timeout = 120 ) {
		$directory = $directory !== null ? $directory : getcwd();

		$process = new Process( $command, null, null, null, $timeout );
		$process->setWorkingDirectory( $directory );
		$process->start();

		$process->wait( function( $type, $buffer ) use ( $output ) {
			$output->writeln( $buffer );
		} );

		if ( ! $process->isSuccessful() ) {
			throw new ProcessFailedException( $process );
		}

		return $process;
	}