From 4da8cab5f87dd52df1df9ae39d146d18ee79f907 Mon Sep 17 00:00:00 2001 From: sh4869 Date: Fri, 22 Jan 2016 21:51:25 +0900 Subject: [PATCH] return null when user doesn't set up a remote repository --- lib/src/git.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/git.dart b/lib/src/git.dart index 31da872..65e4411 100644 --- a/lib/src/git.dart +++ b/lib/src/git.dart @@ -27,6 +27,7 @@ Future gitUserEmail() => gitConfig('user.email'); Future gitRepoHomepage() => gitConfig('remote.origin.url').then(repoUrlToHomepage); String repoUrlToHomepage(String repo) { + if (repo == '') return null; var uri = Uri.parse(repo); p.Context context = p.Style.url.context; // Remove '.git' suffix.