11using GitHub . Logging ;
2- using System ;
32using System . Collections . Generic ;
43using System . Diagnostics ;
54
@@ -24,11 +23,12 @@ public void Configure(ProcessStartInfo psi, NPath workingDirectory, bool dontSet
2423
2524 var path = Environment . Path ;
2625 psi . EnvironmentVariables [ "GHU_WORKINGDIR" ] = workingDirectory ;
26+ var pathEnvVarKey = Environment . GetEnvironmentVariableKey ( "PATH" ) ;
2727
2828 if ( dontSetupGit )
2929 {
3030 psi . EnvironmentVariables [ "GHU_FULLPATH" ] = path ;
31- psi . EnvironmentVariables [ "PATH" ] = path ;
31+ psi . EnvironmentVariables [ pathEnvVarKey ] = path ;
3232 return ;
3333 }
3434
@@ -87,10 +87,10 @@ public void Configure(ProcessStartInfo psi, NPath workingDirectory, bool dontSet
8787
8888 pathEntries . Add ( "END" ) ;
8989
90- path = String . Join ( separator , pathEntries . ToArray ( ) ) + separator + path ;
90+ path = string . Join ( separator , pathEntries . ToArray ( ) ) + separator + path ;
9191
9292 psi . EnvironmentVariables [ "GHU_FULLPATH" ] = path ;
93- psi . EnvironmentVariables [ "PATH" ] = path ;
93+ psi . EnvironmentVariables [ pathEnvVarKey ] = path ;
9494
9595 //TODO: Remove with Git LFS Locking becomes standard
9696 psi . EnvironmentVariables [ "GITLFSLOCKSENABLED" ] = "1" ;
@@ -102,11 +102,11 @@ public void Configure(ProcessStartInfo psi, NPath workingDirectory, bool dontSet
102102 }
103103
104104 var httpProxy = Environment . GetEnvironmentVariable ( "HTTP_PROXY" ) ;
105- if ( ! String . IsNullOrEmpty ( httpProxy ) )
105+ if ( ! string . IsNullOrEmpty ( httpProxy ) )
106106 psi . EnvironmentVariables [ "HTTP_PROXY" ] = httpProxy ;
107107
108108 var httpsProxy = Environment . GetEnvironmentVariable ( "HTTPS_PROXY" ) ;
109- if ( ! String . IsNullOrEmpty ( httpsProxy ) )
109+ if ( ! string . IsNullOrEmpty ( httpsProxy ) )
110110 psi . EnvironmentVariables [ "HTTPS_PROXY" ] = httpsProxy ;
111111 psi . EnvironmentVariables [ "DISPLAY" ] = "0" ;
112112 }
0 commit comments