File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed
GitVersionCore.Tests/Helpers Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,24 @@ public static void DumpGraph(this IRepository repository)
1515 {
1616 var output = new StringBuilder ( ) ;
1717
18- ProcessHelper . Run (
19- o => output . AppendLine ( o ) ,
20- e => output . AppendLineFormat ( "ERROR: {0}" , e ) ,
21- null ,
22- "git" ,
23- @"log --graph --abbrev-commit --decorate --date=relative --all" ,
24- repository . Info . Path ) ;
18+ try
19+ {
20+ ProcessHelper . Run (
21+ o => output . AppendLine ( o ) ,
22+ e => output . AppendLineFormat ( "ERROR: {0}" , e ) ,
23+ null ,
24+ "git" ,
25+ @"log --graph --abbrev-commit --decorate --date=relative --all" ,
26+ repository . Info . Path ) ;
27+ }
28+ catch ( FileNotFoundException exception )
29+ {
30+ if ( exception . FileName != "git" )
31+ throw ;
32+
33+ output . AppendLine ( "Could not execute 'git log' due to the following error:" ) ;
34+ output . AppendLine ( exception . ToString ( ) ) ;
35+ }
2536
2637 Trace . Write ( output . ToString ( ) ) ;
2738 }
You can’t perform that action at this time.
0 commit comments