@@ -112,31 +112,35 @@ public void SetupGitIfNeeded(ActionTask<NPath> onSuccess, ITask onFailure)
112
112
}
113
113
else
114
114
{
115
- ITask downloadFilesTask1 = null ;
115
+ ITask downloadFilesTask = null ;
116
116
if ( gitArchiveFilePath == null || gitLfsArchivePath == null )
117
117
{
118
- downloadFilesTask1 = CreateDownloadTask ( ) ;
118
+ downloadFilesTask = CreateDownloadTask ( ) ;
119
119
}
120
120
121
- var tempZipExtractPath1 = NPath . CreateTempDirectory ( "git_zip_extract_zip_paths" ) ;
122
- var gitExtractPath1 = tempZipExtractPath1 . Combine ( "git" ) . CreateDirectory ( ) ;
123
- var gitLfsExtractPath1 = tempZipExtractPath1 . Combine ( "git-lfs" ) . CreateDirectory ( ) ;
121
+ var tempZipExtractPath = NPath . CreateTempDirectory ( "git_zip_extract_zip_paths" ) ;
122
+ var gitExtractPath = tempZipExtractPath . Combine ( "git" ) . CreateDirectory ( ) ;
123
+ var gitLfsExtractPath = tempZipExtractPath . Combine ( "git-lfs" ) . CreateDirectory ( ) ;
124
124
125
- var resultTask1 = new UnzipTask ( cancellationToken , gitArchiveFilePath , gitExtractPath1 , sharpZipLibHelper , environment . FileSystem , GitInstallDetails . GitExtractedMD5 )
126
- . Then ( new UnzipTask ( cancellationToken , gitLfsArchivePath , gitLfsExtractPath1 , sharpZipLibHelper , environment . FileSystem , GitInstallDetails . GitLfsExtractedMD5 ) )
125
+ var resultTask = new UnzipTask ( cancellationToken , gitArchiveFilePath , gitExtractPath , sharpZipLibHelper , environment . FileSystem , GitInstallDetails . GitExtractedMD5 )
126
+ . Then ( new UnzipTask ( cancellationToken , gitLfsArchivePath , gitLfsExtractPath , sharpZipLibHelper , environment . FileSystem , GitInstallDetails . GitLfsExtractedMD5 ) )
127
127
. Then ( ( ) => {
128
- var targetGitLfsExecPath1 = installDetails . GetGitLfsExecPath ( gitExtractPath1 ) ;
129
- var extractGitLfsExePath1 = gitLfsExtractPath1 . Combine ( installDetails . GitLfsExec ) ;
130
- extractGitLfsExePath1 . Move ( targetGitLfsExecPath1 ) ;
128
+ var targetGitLfsExecPath = installDetails . GetGitLfsExecPath ( gitExtractPath ) ;
129
+ var extractGitLfsExePath = gitLfsExtractPath . Combine ( installDetails . GitLfsExec ) ;
131
130
132
- Logger . Trace ( "Moving tempDirectory:\" {0}\" to extractTarget:\" {1}\" " , gitExtractPath1 ,
131
+ Logger . Trace ( "Moving Git LFS Exe:\" {0}\" to target in tempDirectory:\" {1}\" " , extractGitLfsExePath ,
132
+ targetGitLfsExecPath ) ;
133
+
134
+ extractGitLfsExePath . Move ( targetGitLfsExecPath ) ;
135
+
136
+ Logger . Trace ( "Moving tempDirectory:\" {0}\" to extractTarget:\" {1}\" " , gitExtractPath ,
133
137
installDetails . GitInstallPath ) ;
134
138
135
139
installDetails . GitInstallPath . EnsureParentDirectoryExists ( ) ;
136
- gitExtractPath1 . Move ( installDetails . GitInstallPath ) ;
140
+ gitExtractPath . Move ( installDetails . GitInstallPath ) ;
137
141
138
- Logger . Trace ( "Deleting tempZipPath:\" {0}\" " , tempZipExtractPath1 ) ;
139
- tempZipExtractPath1 . DeleteIfExists ( ) ;
142
+ Logger . Trace ( "Deleting tempZipPath:\" {0}\" " , tempZipExtractPath ) ;
143
+ tempZipExtractPath . DeleteIfExists ( ) ;
140
144
} )
141
145
. Finally ( ( b , exception ) => {
142
146
if ( b )
@@ -155,12 +159,12 @@ public void SetupGitIfNeeded(ActionTask<NPath> onSuccess, ITask onFailure)
155
159
}
156
160
} ) ;
157
161
158
- if ( downloadFilesTask1 != null )
162
+ if ( downloadFilesTask != null )
159
163
{
160
- resultTask1 = downloadFilesTask1 . Then ( resultTask1 ) ;
164
+ resultTask = downloadFilesTask . Then ( resultTask ) ;
161
165
}
162
166
163
- resultTask1 . Start ( ) ;
167
+ resultTask . Start ( ) ;
164
168
}
165
169
166
170
} ) . Start ( ) ;
0 commit comments