@@ -57,8 +57,13 @@ export class SysInfoBase implements ISysInfo {
57
57
return this . javaCompilerVerCache ;
58
58
}
59
59
60
+ private xCodeVerCache : string = null ;
60
61
public async getXCodeVersion ( ) : Promise < string > {
61
- return this . $hostInfo . isDarwin ? await this . exec ( "xcodebuild -version" ) : null ;
62
+ if ( ! this . xCodeVerCache ) {
63
+ this . xCodeVerCache = this . $hostInfo . isDarwin ? await this . exec ( "xcodebuild -version" ) : null ;
64
+ }
65
+
66
+ return this . xCodeVerCache ;
62
67
}
63
68
64
69
private nodeGypVerCache : string = null ;
@@ -147,9 +152,9 @@ export class SysInfoBase implements ISysInfo {
147
152
res . procArch = process . arch ;
148
153
res . nodeVer = process . version ;
149
154
150
- res . npmVer = await this . getNpmVersion ( ) ; //not used anywhere except for tests
155
+ res . npmVer = await this . getNpmVersion ( ) ;
151
156
152
- res . javaVer = await this . getJavaVersion ( ) ; //not used anywhere except for tests
157
+ res . javaVer = await this . getJavaVersion ( ) ;
153
158
154
159
res . nodeGypVer = await this . getNodeGypVersion ( ) ;
155
160
res . xcodeVer = await this . getXCodeVersion ( ) ;
@@ -197,7 +202,7 @@ export class SysInfoBase implements ISysInfo {
197
202
}
198
203
} catch ( e ) {
199
204
// if we got an error, assume not working
200
- this . $logger . trace ( `Error while executing child process : ${ e } ` ) ;
205
+ this . $logger . trace ( `Error while executing ${ cmd } : ${ e . message } ` ) ;
201
206
}
202
207
203
208
return null ;
0 commit comments