public function executeCommandInProcess($cmd, $timeout = null){
        Context::get('output')->write("<comment>$cmd</comment>\n\n");
        $process = new Process($cmd);

        if ($timeout !== null) {
            $process->setTimeout($timeout);
        }

        $process->run(function ($type, $buffer) {
            Context::get('output')->write($buffer);
        });
        return $process;
    }
public function executeCommandInProcess($cmd, $timeout = null){
        Context::get('output')->write("<comment>$cmd</comment>\n\n");
        $process = new Process($cmd);

        if ($timeout !== null) {
            $process->setTimeout($timeout);
        }

        $process->run(function ($type, $buffer) {
            Context::get('output')->write($buffer);
        });
        return $process;
    }
public function executeCommandInProcess ( $ cmd , $ timeout = null ) { Context :: get ( 'output' ) -> write ( "<comment>$cmd</comment>\n\n" ) ; $ process = new Process ( $ cmd ) ; if ( $ timeout !== null ) { $ process -> setTimeout ( $ timeout ) ; } $ process -> run ( function ( $ type , $ buffer ) { Context :: get ( 'output' ) -> write ( $ buffer ) ; } ) ; return $ process ; }
Execute a command and render the output through the classical indented output
@param string $cmd
@param float|null $timeout
@return Process
Execute a command and render the output through the classical indented output