@@ -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 , projectDir ?: string } ) : Promise < void > {
20
+ public async printWarnings ( configOptions ?: { trackResult : boolean , projectDir ?: string , runtimeVersion ?: string } ) : Promise < void > {
21
21
const infos = await this . $terminalSpinnerService . execute < NativeScriptDoctor . IInfo [ ] > ( {
22
22
text : `Getting environment information ${ EOL } `
23
- } , ( ) => doctor . getInfos ( { projectDir : configOptions && configOptions . projectDir } ) ) ;
23
+ } , ( ) => doctor . getInfos ( { projectDir : configOptions && configOptions . projectDir , androidRuntimeVersion : configOptions && configOptions . runtimeVersion } ) ) ;
24
24
25
25
const warnings = infos . filter ( info => info . type === constants . WARNING_TYPE_NAME ) ;
26
26
const hasWarnings = warnings . length > 0 ;
@@ -34,12 +34,11 @@ class DoctorService implements IDoctorService {
34
34
await this . $analyticsService . track ( "DoctorEnvironmentSetup" , hasWarnings ? "incorrect" : "correct" ) ;
35
35
}
36
36
37
- this . printInfosCore ( infos ) ;
38
-
39
37
if ( hasWarnings ) {
40
38
this . $logger . info ( "There seem to be issues with your configuration." ) ;
41
39
} else {
42
40
this . $logger . out ( "No issues were detected." . bold ) ;
41
+ this . printInfosCore ( infos ) ;
43
42
}
44
43
45
44
try {
@@ -81,12 +80,12 @@ class DoctorService implements IDoctorService {
81
80
} ) ;
82
81
}
83
82
84
- public async canExecuteLocalBuild ( platform ?: string , projectDir ?: string ) : Promise < boolean > {
83
+ public async canExecuteLocalBuild ( platform ?: string , projectDir ?: string , runtimeVersion ?: string ) : Promise < boolean > {
85
84
await this . $analyticsService . trackEventActionInGoogleAnalytics ( {
86
85
action : TrackActionNames . CheckLocalBuildSetup ,
87
86
additionalData : "Starting" ,
88
87
} ) ;
89
- const infos = await doctor . getInfos ( { platform, projectDir } ) ;
88
+ const infos = await doctor . getInfos ( { platform, projectDir, androidRuntimeVersion : runtimeVersion } ) ;
90
89
91
90
const warnings = this . filterInfosByType ( infos , constants . WARNING_TYPE_NAME ) ;
92
91
const hasWarnings = warnings . length > 0 ;
0 commit comments