File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 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 {
214214 private openAppInspector ( fileDescriptor : string ) : IFuture < void > {
215215 if ( this . $options . client ) {
216216 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+ }
218221 let inspectorSourceLocation = path . join ( inspectorPath , inspectorUiDir , "Main.html" ) ;
219222 let inspectorApplicationPath = path . join ( inspectorPath , inspectorAppName ) ;
220223
@@ -227,5 +230,14 @@ class IOSDebugService implements IDebugService {
227230 } ) . future < void > ( ) ( ) ;
228231 }
229232 }
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+ }
230242}
231243$injector . register ( "iOSDebugService" , IOSDebugService ) ;
You can’t perform that action at this time.
0 commit comments