public function runLocalCommand($cmd, $timeout = 120)
    {
        $this->log($cmd, LogLevel::INFO);

        $process = new Process($cmd);
        $process->setTimeout($timeout);
        $process->run();

        $this->log($process->getOutput(), LogLevel::DEBUG);
        if (!$process->isSuccessful()) {
            $this->log($process->getErrorOutput(), LogLevel::ERROR);
        }

        return $process;
    }
public function runLocalCommand($cmd, $timeout = 120)
    {
        $this->log($cmd, LogLevel::INFO);

        $process = new Process($cmd);
        $process->setTimeout($timeout);
        $process->run();

        $this->log($process->getOutput(), LogLevel::DEBUG);
        if (!$process->isSuccessful()) {
            $this->log($process->getErrorOutput(), LogLevel::ERROR);
        }

        return $process;
    }
public function runLocalCommand ( $ cmd , $ timeout = 120 ) { $ this -> log ( $ cmd , LogLevel :: INFO ) ; $ process = new Process ( $ cmd ) ; $ process -> setTimeout ( $ timeout ) ; $ process -> run ( ) ; $ this -> log ( $ process -> getOutput ( ) , LogLevel :: DEBUG ) ; if ( ! $ process -> isSuccessful ( ) ) { $ this -> log ( $ process -> getErrorOutput ( ) , LogLevel :: ERROR ) ; } return $ process ; }
Execute a command locally

@param string $cmd Command to execute
@param int $timeout Seconds to wait
@return Process
Execute a command locally