@@ -17,10 +17,10 @@ class DoctorService implements IDoctorService {
1717 private $terminalSpinnerService : ITerminalSpinnerService ,
1818 private $versionsService : IVersionsService ) { }
1919
20- public async printWarnings ( configOptions ?: { trackResult : boolean } ) : Promise < void > {
20+ public async printWarnings ( configOptions ?: { trackResult : boolean , projectDir ?: string } ) : Promise < void > {
2121 const infos = await this . $terminalSpinnerService . execute < NativeScriptDoctor . IInfo [ ] > ( {
2222 text : `Getting environment information ${ EOL } `
23- } , ( ) => doctor . getInfos ( ) ) ;
23+ } , ( ) => doctor . getInfos ( { projectDir : configOptions && configOptions . projectDir } ) ) ;
2424
2525 const warnings = infos . filter ( info => info . type === constants . WARNING_TYPE_NAME ) ;
2626 const hasWarnings = warnings . length > 0 ;
@@ -48,7 +48,7 @@ class DoctorService implements IDoctorService {
4848 this . $logger . error ( "Cannot get the latest versions information from npm. Please try again later." ) ;
4949 }
5050
51- await this . $injector . resolve ( "platformEnvironmentRequirements" ) . checkEnvironmentRequirements ( null ) ;
51+ await this . $injector . resolve ( "platformEnvironmentRequirements" ) . checkEnvironmentRequirements ( null , configOptions && configOptions . projectDir ) ;
5252 }
5353
5454 public async runSetupScript ( ) : Promise < ISpawnResult > {
@@ -81,12 +81,12 @@ class DoctorService implements IDoctorService {
8181 } ) ;
8282 }
8383
84- public async canExecuteLocalBuild ( platform ?: string ) : Promise < boolean > {
84+ public async canExecuteLocalBuild ( platform ?: string , projectDir ?: string ) : Promise < boolean > {
8585 await this . $analyticsService . trackEventActionInGoogleAnalytics ( {
8686 action : TrackActionNames . CheckLocalBuildSetup ,
8787 additionalData : "Starting" ,
8888 } ) ;
89- const infos = await doctor . getInfos ( { platform } ) ;
89+ const infos = await doctor . getInfos ( { platform, projectDir } ) ;
9090
9191 const warnings = this . filterInfosByType ( infos , constants . WARNING_TYPE_NAME ) ;
9292 const hasWarnings = warnings . length > 0 ;
0 commit comments