public function exec(string $command, array $remote = [], $color = 'note-inverted')
    {
        if ($remote) {
            $path    = $remote['path'] ? $remote['path'] : '~';
            $command = "ssh -t -p {$remote['port']} {$remote['auth']} \"cd {$path} && {$command}\"";
        }

        $this->out->writeln("\n<{$color}> {$command} </{$color}>\n");

        return passthru($command);
    }
public function exec(string $command, array $remote = [], $color = 'note-inverted')
    {
        if ($remote) {
            $path    = $remote['path'] ? $remote['path'] : '~';
            $command = "ssh -t -p {$remote['port']} {$remote['auth']} \"cd {$path} && {$command}\"";
        }

        $this->out->writeln("\n<{$color}> {$command} </{$color}>\n");

        return passthru($command);
    }
public function exec ( string $ command , array $ remote = [ ] , $ color = 'note-inverted' ) { if ( $ remote ) { $ path = $ remote [ 'path' ] ? $ remote [ 'path' ] : '~' ; $ command = "ssh -t -p {$remote['port']} {$remote['auth']} \"cd {$path} && {$command}\"" ; } $ this -> out -> writeln ( "\n<{$color}> {$command} </{$color}>\n" ) ; return passthru ( $ command ) ; }
Execute an command and display output

@param string $command
@param array  $remote
@param string $color
Execute an command and display output