@@ -30,6 +30,16 @@ function checkEnvVar(logger: Logger, name: string): boolean {
3030 }
3131}
3232
33+ // The JRE properties that may affect the proxy.
34+ const javaProperties = [
35+ "http.proxyHost" ,
36+ "http.proxyPort" ,
37+ "https.proxyHost" ,
38+ "https.proxyPort" ,
39+ "http.nonProxyHosts" ,
40+ "java.net.useSystemProxies" ,
41+ ] ;
42+
3343/** Java-specific environment variables which may contain information about proxy settings. */
3444export const JAVA_PROXY_ENV_VARS : JavaEnvVars [ ] = [
3545 JavaEnvVars . JAVA_TOOL_OPTIONS ,
@@ -83,16 +93,6 @@ export function checkJdkSettings(logger: Logger, jdkHome: string) {
8393 path . join ( "lib" , "net.properties" ) ,
8494 ] ;
8595
86- // The JRE properties that may affect the proxy.
87- const properties = [
88- "http.proxyHost" ,
89- "http.proxyPort" ,
90- "https.proxyHost" ,
91- "https.proxyPort" ,
92- "http.nonProxyHosts" ,
93- "java.net.useSystemProxies" ,
94- ] ;
95-
9696 for ( const fileToCheck of filesToCheck ) {
9797 const file = path . join ( jdkHome , fileToCheck ) ;
9898
@@ -102,7 +102,7 @@ export function checkJdkSettings(logger: Logger, jdkHome: string) {
102102
103103 const lines = String ( fs . readFileSync ( file ) ) . split ( "\n" ) ;
104104 for ( const line of lines ) {
105- for ( const property of properties ) {
105+ for ( const property of javaProperties ) {
106106 if ( line . startsWith ( `${ property } =` ) ) {
107107 logger . info ( `Found '${ line . trimEnd ( ) } ' in '${ file } '.` ) ;
108108 }
0 commit comments