SebastianBergmann\Git\Git::execute PHP Method

execute() protected method

protected execute ( string $command )
$command string
    protected function execute($command)
    {
        $command = 'git -C ' . escapeshellarg($this->repositoryPath) . ' ' . $command;
        if (DIRECTORY_SEPARATOR == '/') {
            $command = 'LC_ALL=en_US.UTF-8 ' . $command;
        }
        exec($command, $output, $returnValue);
        if ($returnValue !== 0) {
            throw new RuntimeException(implode("\r\n", $output));
        }
        return $output;
    }