@@ -17,10 +17,10 @@ class DoctorService implements IDoctorService {
17
17
private $terminalSpinnerService : ITerminalSpinnerService ,
18
18
private $versionsService : IVersionsService ) { }
19
19
20
- public async printWarnings ( configOptions ?: { trackResult : boolean } ) : Promise < void > {
20
+ public async printWarnings ( configOptions ?: { trackResult : boolean , projectDir ?: string } ) : Promise < void > {
21
21
const infos = await this . $terminalSpinnerService . execute < NativeScriptDoctor . IInfo [ ] > ( {
22
22
text : `Getting environment information ${ EOL } `
23
- } , ( ) => doctor . getInfos ( ) ) ;
23
+ } , ( ) => doctor . getInfos ( { projectDir : configOptions && configOptions . projectDir } ) ) ;
24
24
25
25
const warnings = infos . filter ( info => info . type === constants . WARNING_TYPE_NAME ) ;
26
26
const hasWarnings = warnings . length > 0 ;
@@ -48,7 +48,7 @@ class DoctorService implements IDoctorService {
48
48
this . $logger . error ( "Cannot get the latest versions information from npm. Please try again later." ) ;
49
49
}
50
50
51
- await this . $injector . resolve ( "platformEnvironmentRequirements" ) . checkEnvironmentRequirements ( null ) ;
51
+ await this . $injector . resolve ( "platformEnvironmentRequirements" ) . checkEnvironmentRequirements ( null , configOptions && configOptions . projectDir ) ;
52
52
}
53
53
54
54
public async runSetupScript ( ) : Promise < ISpawnResult > {
@@ -81,12 +81,12 @@ class DoctorService implements IDoctorService {
81
81
} ) ;
82
82
}
83
83
84
- public async canExecuteLocalBuild ( platform ?: string ) : Promise < boolean > {
84
+ public async canExecuteLocalBuild ( platform ?: string , projectDir ?: string ) : Promise < boolean > {
85
85
await this . $analyticsService . trackEventActionInGoogleAnalytics ( {
86
86
action : TrackActionNames . CheckLocalBuildSetup ,
87
87
additionalData : "Starting" ,
88
88
} ) ;
89
- const infos = await doctor . getInfos ( { platform } ) ;
89
+ const infos = await doctor . getInfos ( { platform, projectDir } ) ;
90
90
91
91
const warnings = this . filterInfosByType ( infos , constants . WARNING_TYPE_NAME ) ;
92
92
const hasWarnings = warnings . length > 0 ;
0 commit comments