@@ -10,7 +10,7 @@ interface IGitClient
10
10
{
11
11
Task < NPath > FindGitInstallation ( ) ;
12
12
13
- ITask < bool > ValidateGitInstall ( NPath path ) ;
13
+ ITask < bool > ValidateGitInstall ( string path ) ;
14
14
15
15
ITask Init ( IOutputProcessor < string > processor = null ) ;
16
16
@@ -153,9 +153,9 @@ private async Task<NPath> LookForSystemGit()
153
153
return path ;
154
154
}
155
155
156
- public ITask < bool > ValidateGitInstall ( NPath path )
156
+ public ITask < bool > ValidateGitInstall ( string path )
157
157
{
158
- if ( ! path . FileExists ( ) )
158
+ if ( ! path . ToNPath ( ) . FileExists ( ) )
159
159
{
160
160
return new FuncTask < bool > ( cancellationToken , ( ) => false ) ;
161
161
}
@@ -164,29 +164,23 @@ public ITask<bool> ValidateGitInstall(NPath path)
164
164
SoftwareVersion ? gitLfsVersion = null ;
165
165
166
166
var gitVersionTask = new GitVersionTask ( cancellationToken ) ;
167
- gitVersionTask . Configure ( processManager , path . ToString ( ) ,
167
+ gitVersionTask . Configure ( processManager , path ,
168
168
gitVersionTask . ProcessArguments , environment . RepositoryPath ) ;
169
169
170
170
var gitLfsVersionTask = new GitLfsVersionTask ( cancellationToken ) ;
171
- gitLfsVersionTask . Configure ( processManager , path . ToString ( ) ,
171
+ gitLfsVersionTask . Configure ( processManager , path ,
172
172
gitLfsVersionTask . ProcessArguments , environment . RepositoryPath ) ;
173
173
174
174
return gitVersionTask
175
175
. Then ( ( result , version ) => { gitVersion = version ; } )
176
176
. Then ( gitLfsVersionTask )
177
177
. Then ( ( result , version ) => {
178
178
gitLfsVersion = version ;
179
- } ) . Then ( result => {
180
- if ( result )
181
- {
182
- return gitVersion . HasValue &&
183
- gitVersion . Value >= new SoftwareVersion ( 2 , 1 , 0 ) &&
184
- gitLfsVersion . HasValue &&
185
- gitLfsVersion . Value >= new SoftwareVersion ( 2 , 1 , 0 ) ;
186
- }
187
-
188
- return false ;
189
- } ) ;
179
+ } ) . Then ( result => result &&
180
+ gitVersion . HasValue &&
181
+ gitVersion . Value >= new SoftwareVersion ( 2 , 1 , 0 ) &&
182
+ gitLfsVersion . HasValue &&
183
+ gitLfsVersion . Value >= new SoftwareVersion ( 2 , 1 , 0 ) ) ;
190
184
}
191
185
192
186
public ITask Init ( IOutputProcessor < string > processor = null )
0 commit comments