src/App.php
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;
	}
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;
	}
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 ; }
Run a shell command and return the output as it comes in.

@param  string          $command
@param  OutputInterface $output
@param  string|null     $directory
@param  integer         $timeout
@return Process
Run a shell command and return the output as it comes in .