@@ -207,13 +207,14 @@ class IOSDebugService implements IDebugService {
207
207
208
208
private openDebuggingClient ( ) : IFuture < void > {
209
209
return ( ( ) => {
210
- let inspectorPath = this . getInspectorPath ( ) . wait ( ) ;
211
- let inspectorSourceLocation = path . join ( inspectorPath , "Safari/Main.html" ) ;
212
- let cmd : string = null ;
213
-
214
210
this . $projectDataService . initialize ( this . $projectData . projectDir ) ;
215
211
let platformData = this . $platformsData . getPlatformData ( this . platform ) ;
216
212
let frameworkVersion = this . $projectDataService . getValue ( platformData . frameworkPackageName ) . wait ( ) . version ;
213
+
214
+ let inspectorPath = this . getInspectorPath ( frameworkVersion ) . wait ( ) ;
215
+ let inspectorSourceLocation = path . join ( inspectorPath , "Safari/Main.html" ) ;
216
+ let cmd : string = null ;
217
+
217
218
if ( semver . lt ( frameworkVersion , "1.2.0" ) ) {
218
219
cmd = `open -a Safari "${ inspectorSourceLocation } "` ;
219
220
} else {
@@ -228,7 +229,7 @@ class IOSDebugService implements IDebugService {
228
229
} ) . future < void > ( ) ( ) ;
229
230
}
230
231
231
- private getInspectorPath ( ) : IFuture < string > {
232
+ private getInspectorPath ( frameworkVersion : string ) : IFuture < string > {
232
233
return ( ( ) => {
233
234
var tnsIosPackage = "" ;
234
235
if ( this . $options . frameworkPath ) {
@@ -238,7 +239,7 @@ class IOSDebugService implements IDebugService {
238
239
tnsIosPackage = path . resolve ( this . $options . frameworkPath ) ;
239
240
} else {
240
241
var platformData = this . $platformsData . getPlatformData ( this . platform ) ;
241
- tnsIosPackage = this . $npmInstallationManager . install ( platformData . frameworkPackageName ) . wait ( ) ;
242
+ tnsIosPackage = this . $npmInstallationManager . getCachedPackagePath ( platformData . frameworkPackageName , frameworkVersion ) ;
242
243
}
243
244
var inspectorPath = path . join ( tnsIosPackage , "WebInspectorUI/" ) ;
244
245
return inspectorPath ;
0 commit comments