@@ -64,19 +64,18 @@ public void GitInstallWindows()
6464 ZipHelper . Instance = zipHelper ;
6565 var gitInstaller = new GitInstaller ( Environment , ProcessManager , TaskManager . Token , null , installDetails : installDetails ) ;
6666
67- var result = gitInstaller . SetupGitIfNeeded ( ) ;
68- result . Should ( ) . NotBeNull ( ) ;
69-
70- Assert . AreEqual ( gitInstallationPath . Combine ( installDetails . PackageNameWithVersion ) , result . GitInstallationPath ) ;
71- result . GitExecutablePath . Should ( ) . Be ( gitInstallationPath . Combine ( installDetails . PackageNameWithVersion , "cmd" , "git" + Environment . ExecutableExtension ) ) ;
72- result . GitLfsExecutablePath . Should ( ) . Be ( gitInstallationPath . Combine ( installDetails . PackageNameWithVersion , "mingw32" , "libexec" , "git-core" , "git-lfs" + Environment . ExecutableExtension ) ) ;
73-
74- var isCustomGitExec = result . GitExecutablePath != result . GitExecutablePath ;
67+ var state = gitInstaller . SetupGitIfNeeded ( ) ;
68+ state . Should ( ) . NotBeNull ( ) ;
7569
76- Environment . GitExecutablePath = result . GitExecutablePath ;
77- Environment . GitLfsExecutablePath = result . GitLfsExecutablePath ;
70+ Assert . AreEqual ( gitInstallationPath . Combine ( installDetails . PackageNameWithVersion ) , state . GitInstallationPath ) ;
71+ state . GitExecutablePath . Should ( ) . Be ( gitInstallationPath . Combine ( installDetails . PackageNameWithVersion , "cmd" , "git" + Environment . ExecutableExtension ) ) ;
72+ state . GitLfsExecutablePath . Should ( ) . Be ( gitInstallationPath . Combine ( installDetails . PackageNameWithVersion , "mingw32" , "libexec" , "git-core" , "git-lfs" + Environment . ExecutableExtension ) ) ;
7873
79- Environment . IsCustomGitExecutable = isCustomGitExec ;
74+ Environment . GitInstallPath = state . GitInstallationPath ;
75+ Environment . GitExecutablePath = state . GitExecutablePath ;
76+ Environment . GitLfsInstallPath = state . GitLfsInstallationPath ;
77+ Environment . GitLfsExecutablePath = state . GitLfsExecutablePath ;
78+ Environment . IsCustomGitExecutable = state . IsCustomGitPath ;
8079
8180 var procTask = new SimpleProcessTask ( TaskManager . Token , "something" )
8281 . Configure ( ProcessManager ) ;
@@ -251,11 +250,11 @@ public void GitLfsIsInstalledIfMissingWithCustomGitPath()
251250 state . GitLfsExecutablePath . Should ( ) . Be ( gitLfsExec ) ;
252251 gitLfsExec . FileExists ( ) . Should ( ) . BeTrue ( ) ;
253252
254- var isCustomGitExec = state . GitExecutablePath != installDetails . GitExecutablePath ;
255-
253+ Environment . GitInstallPath = state . GitInstallationPath ;
256254 Environment . GitExecutablePath = state . GitExecutablePath ;
255+ Environment . GitLfsInstallPath = state . GitLfsInstallationPath ;
257256 Environment . GitLfsExecutablePath = state . GitLfsExecutablePath ;
258- Environment . IsCustomGitExecutable = isCustomGitExec ;
257+ Environment . IsCustomGitExecutable = state . IsCustomGitPath ;
259258
260259 var procTask = new SimpleProcessTask ( TaskManager . Token , "something" )
261260 . Configure ( ProcessManager ) ;
0 commit comments