File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,10 @@ class IOSDebugService implements IDebugService {
214
214
private openAppInspector ( fileDescriptor : string ) : IFuture < void > {
215
215
if ( this . $options . client ) {
216
216
return ( ( ) => {
217
- let inspectorPath = this . $npmInstallationManager . install ( inspectorNpmPackageName , this . $projectData . projectDir , { dependencyType : "save-dev" } ) . wait ( ) ;
217
+ let inspectorPath = path . join ( this . $projectData . projectDir , "node_modules" , inspectorNpmPackageName ) ;
218
+ if ( ! this . inspectorAlreadyInstalled ( inspectorPath ) . wait ( ) ) {
219
+ inspectorPath = this . $npmInstallationManager . install ( inspectorNpmPackageName , this . $projectData . projectDir , { dependencyType : "save-dev" } ) . wait ( ) ;
220
+ }
218
221
let inspectorSourceLocation = path . join ( inspectorPath , inspectorUiDir , "Main.html" ) ;
219
222
let inspectorApplicationPath = path . join ( inspectorPath , inspectorAppName ) ;
220
223
@@ -227,5 +230,14 @@ class IOSDebugService implements IDebugService {
227
230
} ) . future < void > ( ) ( ) ;
228
231
}
229
232
}
233
+
234
+ private inspectorAlreadyInstalled ( pathToInspector : string ) : IFuture < Boolean > {
235
+ return ( ( ) => {
236
+ if ( this . $fs . exists ( pathToInspector ) . wait ( ) ) {
237
+ return true ;
238
+ }
239
+ return false ;
240
+ } ) . future < Boolean > ( ) ( ) ;
241
+ }
230
242
}
231
243
$injector . register ( "iOSDebugService" , IOSDebugService ) ;
You can’t perform that action at this time.
0 commit comments