@@ -54,6 +54,7 @@ public void Configure(ProcessStartInfo psi, NPath workingDirectory)
54
54
55
55
var gitPathRoot = Environment . GitInstallPath ;
56
56
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)
57
58
58
59
// Paths to developer tools such as msbuild.exe
59
60
//var developerPaths = StringExtensions.JoinForAppending(";", developerEnvironment.GetPaths());
@@ -78,19 +79,17 @@ public void Configure(ProcessStartInfo psi, NPath workingDirectory)
78
79
if ( Environment . IsWindows )
79
80
{
80
81
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 } ";
84
83
}
85
84
else
86
85
{
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 } ";
90
87
}
91
88
psi . EnvironmentVariables [ "GIT_EXEC_PATH" ] = execPath . ToString ( ) ;
92
89
93
90
psi . EnvironmentVariables [ "PATH" ] = path ;
91
+ psi . EnvironmentVariables [ "GHU_FULLPATH" ] = path ;
92
+ psi . EnvironmentVariables [ "GHU_WORKINGDIR" ] = workingDirectory ;
94
93
95
94
psi . EnvironmentVariables [ "PLINK_PROTOCOL" ] = "ssh" ;
96
95
psi . EnvironmentVariables [ "TERM" ] = "msys" ;
0 commit comments