File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export class SysInfo implements NativeScriptDoctor.ISysInfo {
6868 public getJavaCompilerVersion ( ) : Promise < string > {
6969 return this . getValueForProperty ( ( ) => this . javaCompilerVerCache , async ( ) : Promise < string > => {
7070 const javaCompileExecutableName = "javac" ;
71- const javaHome = process . env . JAVA_HOME ;
71+ const javaHome = process . env [ " JAVA_HOME" ] ;
7272 const pathToJavaCompilerExecutable = javaHome ? path . join ( javaHome , "bin" , javaCompileExecutableName ) : javaCompileExecutableName ;
7373 try {
7474 const output = await this . childProcess . exec ( `"${ pathToJavaCompilerExecutable } " -version` ) ;
@@ -135,7 +135,7 @@ export class SysInfo implements NativeScriptDoctor.ISysInfo {
135135 let mobileDeviceDir : string ;
136136
137137 if ( this . hostInfo . isWindows ) {
138- const commonProgramFiles = this . hostInfo . isWindows64 ? process . env [ "CommonProgramFiles(x86)" ] : process . env . CommonProgramFiles ;
138+ const commonProgramFiles = this . hostInfo . isWindows64 ? process . env [ "CommonProgramFiles(x86)" ] : process . env [ " CommonProgramFiles" ] ;
139139 coreFoundationDir = path . join ( commonProgramFiles , "Apple" , "Apple Application Support" ) ;
140140 mobileDeviceDir = path . join ( commonProgramFiles , "Apple" , "Mobile Device Support" ) ;
141141 } else if ( this . hostInfo . isDarwin ) {
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ describe("SysInfo unit tests", () => {
153153
154154 beforeEach ( ( ) => {
155155 // We need to mock this because on Mac the tests in which the platform is mocked to Windows in the process there will be no CommonProgramFiles.
156- process . env . CommonProgramFiles = process . env . CommonProgramFiles || "mocked on mac" ;
156+ process . env [ " CommonProgramFiles" ] = process . env [ " CommonProgramFiles" ] || "mocked on mac" ;
157157 process . env [ "CommonProgramFiles(x86)" ] = process . env [ "CommonProgramFiles(x86)" ] || "mocked on mac" ;
158158 } ) ;
159159
You can’t perform that action at this time.
0 commit comments