@@ -22,34 +22,40 @@ internal class DependabotProxy
2222 /// </summary>
2323 internal bool IsConfigured => ! string . IsNullOrEmpty ( this . Address ) ;
2424
25- internal DependabotProxy ( TemporaryDirectory tempWorkingDirectory )
25+ internal DependabotProxy ( ILogger logger , TemporaryDirectory tempWorkingDirectory )
2626 {
2727 // Obtain and store the address of the Dependabot proxy, if available.
2828 this . host = Environment . GetEnvironmentVariable ( EnvironmentVariableNames . ProxyHost ) ;
2929 this . port = Environment . GetEnvironmentVariable ( EnvironmentVariableNames . ProxyPort ) ;
3030
3131 if ( string . IsNullOrWhiteSpace ( host ) || string . IsNullOrWhiteSpace ( port ) )
3232 {
33+ logger . LogInfo ( "No Dependabot proxy credentials are configured." ) ;
3334 return ;
3435 }
3536
3637 this . Address = $ "http://{ this . host } :{ this . port } ";
38+ logger . LogInfo ( $ "Dependabot proxy configured at { this . Address } ") ;
3739
3840 // Obtain and store the proxy's certificate, if available.
3941 var cert = Environment . GetEnvironmentVariable ( EnvironmentVariableNames . ProxyCertificate ) ;
4042
4143 if ( string . IsNullOrWhiteSpace ( cert ) )
4244 {
45+ logger . LogInfo ( "No certificate configured for Dependabot proxy." ) ;
4346 return ;
4447 }
4548
4649 var certDirPath = new DirectoryInfo ( Path . Join ( tempWorkingDirectory . DirInfo . FullName , ".dependabot-proxy" ) ) ;
4750 Directory . CreateDirectory ( certDirPath . FullName ) ;
4851
49- this . certFile = new FileInfo ( Path . Join ( certDirPath . FullName , "proxy.crt" ) ) ;
52+ var certFilePath = Path . Join ( certDirPath . FullName , "proxy.crt" ) ;
53+ this . certFile = new FileInfo ( certFilePath ) ;
5054
5155 using var writer = this . certFile . CreateText ( ) ;
5256 writer . Write ( cert ) ;
57+
58+ logger . LogInfo ( $ "Stored Dependabot proxy certificate at { certFilePath } ") ;
5359 }
5460
5561 internal void ApplyProxy ( ILogger logger , ProcessStartInfo startInfo )
0 commit comments