@@ -54,6 +54,7 @@ public void Configure(ProcessStartInfo psi, NPath workingDirectory)
5454
5555 var gitPathRoot = Environment . GitInstallPath ;
5656 var gitLfsPath = Environment . GitInstallPath ;
57+ var gitExecutableDir = Environment . GitExecutablePath . Parent ; // original path to git (might be different from install path if it's a symlink)
5758
5859 // Paths to developer tools such as msbuild.exe
5960 //var developerPaths = StringExtensions.JoinForAppending(";", developerEnvironment.GetPaths());
@@ -78,19 +79,17 @@ public void Configure(ProcessStartInfo psi, NPath workingDirectory)
7879 if ( Environment . IsWindows )
7980 {
8081 var userPath = @"C:\windows\system32;C:\windows" ;
81- path = String . Format ( CultureInfo . InvariantCulture , @"{0}\cmd;{0}\usr\bin;{1};{2};{0}\usr\share\git-tfs;{3};{4}{5}" ,
82- gitPathRoot , execPath , binPath ,
83- gitLfsPath , userPath , developerPaths ) ;
82+ path = $ "{ gitPathRoot } \\ cmd;{ gitPathRoot } \\ usr\\ bin;{ execPath } ;{ binPath } ;{ gitLfsPath } ;{ userPath } { developerPaths } ";
8483 }
8584 else
8685 {
87- var userPath = Environment . Path ;
88- path = String . Format ( CultureInfo . InvariantCulture , @"{0}:{1}:{2}:{3}{4}" ,
89- binPath , execPath , gitLfsPath , userPath , developerPaths ) ;
86+ path = $ "{ gitExecutableDir } :{ binPath } :{ execPath } :{ gitLfsPath } :{ Environment . Path } :{ developerPaths } ";
9087 }
9188 psi . EnvironmentVariables [ "GIT_EXEC_PATH" ] = execPath . ToString ( ) ;
9289
9390 psi . EnvironmentVariables [ "PATH" ] = path ;
91+ psi . EnvironmentVariables [ "GHU_FULLPATH" ] = path ;
92+ psi . EnvironmentVariables [ "GHU_WORKINGDIR" ] = workingDirectory ;
9493
9594 psi . EnvironmentVariables [ "PLINK_PROTOCOL" ] = "ssh" ;
9695 psi . EnvironmentVariables [ "TERM" ] = "msys" ;
0 commit comments