From 319a3c5fbe599d7845b73d4bca82129f0563a5aa Mon Sep 17 00:00:00 2001 From: TSUYUSATO Kitsune Date: Sat, 28 Apr 2018 21:12:35 +0900 Subject: [PATCH] docs command: don't show error on console when not a git repository (#3700) * Show warning message if cannot detect GitHub repository * Remove warning message not to detect GitHub/GitLab repo --- src/compiler/crystal/tools/doc/generator.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/crystal/tools/doc/generator.cr b/src/compiler/crystal/tools/doc/generator.cr index ae94e6a2a2d9..1b0ce4363b54 100644 --- a/src/compiler/crystal/tools/doc/generator.cr +++ b/src/compiler/crystal/tools/doc/generator.cr @@ -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?