@@ -68,7 +68,7 @@ public void Run(bool firstRun)
68
68
} ) . Start ( ) ;
69
69
} ) ;
70
70
71
- var afterPathDetermined = new ActionTask < NPath > ( CancellationToken , ( b1 , path ) => {
71
+ var afterPathDetermined = new ActionTask < NPath > ( CancellationToken , ( b , path ) => {
72
72
73
73
Logger . Trace ( "Setting Environment git path: {0}" , path ) ;
74
74
Environment . GitExecutablePath = path ;
@@ -87,19 +87,38 @@ public void Run(bool firstRun)
87
87
}
88
88
} ) ;
89
89
90
+ var findExecTask = new FindExecTask ( "git" , CancellationToken )
91
+ . Finally ( ( b , ex , path ) => {
92
+ if ( b && path != null )
93
+ {
94
+ Logger . Trace ( "FindExecTask Success: {0}" , path ) ;
95
+
96
+ new FuncTask < NPath > ( CancellationToken , ( ) => path )
97
+ . Then ( afterPathDetermined )
98
+ . Start ( ) ;
99
+ }
100
+ else
101
+ {
102
+ Logger . Warning ( "FindExecTask Failure" ) ;
103
+ Logger . Error ( "Git not found" ) ;
104
+ }
105
+ } ) ;
106
+
90
107
var applicationDataPath = Environment . GetSpecialFolder ( System . Environment . SpecialFolder . LocalApplicationData ) . ToNPath ( ) ;
91
108
var installDetails = new GitInstallDetails ( applicationDataPath , true ) ;
92
109
var gitInstaller = new GitInstaller ( Environment , CancellationToken , installDetails ) ;
93
- gitInstaller . SetupGitIfNeeded ( new ActionTask < NPath > ( CancellationToken , ( b , s ) => {
110
+ gitInstaller . SetupGitIfNeeded ( new ActionTask < NPath > ( CancellationToken , ( b , path ) => {
94
111
95
- Logger . Trace ( "Success: {0}" , s ) ;
112
+ Logger . Trace ( "GitInstaller Success: {0}" , path ) ;
96
113
97
- new FuncTask < NPath > ( CancellationToken , ( ) => s )
114
+ new FuncTask < NPath > ( CancellationToken , ( ) => path )
98
115
. Then ( afterPathDetermined )
99
116
. Start ( ) ;
100
117
101
118
} ) , new ActionTask ( CancellationToken , ( ) => {
102
- Logger . Trace ( "Failure" ) ;
119
+ Logger . Warning ( "GitInstaller Failure" ) ;
120
+
121
+ findExecTask . Start ( ) ;
103
122
} ) ) ;
104
123
}
105
124
0 commit comments