Skip to content

Commit

Permalink
docs command: don't show error on console when not a git repository (#…
Browse files Browse the repository at this point in the history
…3700)

* Show warning message if cannot detect GitHub repository

* Remove warning message not to detect GitHub/GitLab repo
  • Loading branch information
makenowjust authored and RX14 committed Apr 28, 2018
1 parent d8e765e commit 319a3c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/compiler/crystal/tools/doc/generator.cr
Expand Up @@ -300,6 +300,10 @@ class Crystal::Doc::Generator
end

def compute_repository
# check whether inside git work-tree
`git rev-parse --is-inside-work-tree >/dev/null 2>&1`
return unless $?.success?

remotes = `git remote -v`
return unless $?.success?

Expand Down

0 comments on commit 319a3c5

Please sign in to comment.