GrumPHP\Console\Command\ConfigureCommand::guessGitDir PHP Method

guessGitDir() protected method

protected guessGitDir ( ) : string
return string
    protected function guessGitDir()
    {
        $defaultGitDir = $this->config->getGitDir();
        try {
            $topLevel = $this->repository->run('rev-parse', ['--show-toplevel']);
        } catch (Exception $e) {
            return $defaultGitDir;
        }
        return rtrim($this->paths()->getRelativePath($topLevel), '/');
    }