protected function checkCommandExists($commandName, $argument = '--version')
    {
        $command = $commandName;
        $argument = (string) $argument;
        if ($argument !== '') {
            $command .= ' '.$argument;
        }
        list($rc, , $stdErr) = $this->run($command);
        if ($rc !== 0) {
            throw new Exception\CommandNotFound($commandName, $stdErr ? $stdErr : null);
        }
    }