Skip to content

Commit f8a515c

Browse files
committed
try/catch the git graph dump
1 parent 391f5f3 commit f8a515c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/GitVersionExe/Program.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,17 @@ static int VerifyArgumentsAndRun()
9898
if (arguments != null)
9999
{
100100
Logger.WriteInfo(string.Empty);
101-
Logger.WriteInfo("Here is the current git graph (please include in issue): ");
101+
Logger.WriteInfo("Attempting to show the current git graph (please include in issue): ");
102102
Logger.WriteInfo("Showing max of 100 commits");
103-
GitTools.LibGitExtensions.DumpGraph(arguments.TargetPath, Logger.WriteInfo, 100);
103+
104+
try
105+
{
106+
GitTools.LibGitExtensions.DumpGraph(arguments.TargetPath, Logger.WriteInfo, 100);
107+
}
108+
catch (Exception dumpGraphException)
109+
{
110+
Logger.WriteError("Couldn't dump the git graph due to the following error: " + dumpGraphException);
111+
}
104112
}
105113
return 1;
106114
}

0 commit comments

Comments
 (0)