@@ -20,7 +20,7 @@ class DoctorService implements IDoctorService {
2020 private $terminalSpinnerService : ITerminalSpinnerService ,
2121 private $versionsService : IVersionsService ) { }
2222
23- public async printWarnings ( configOptions ?: { trackResult : boolean } ) : Promise < boolean > {
23+ public async printWarnings ( configOptions ?: { trackResult : boolean } ) : Promise < void > {
2424 const infos = await this . $terminalSpinnerService . execute < NativeScriptDoctor . IInfo [ ] > ( {
2525 text : `Getting environment information ${ EOL } `
2626 } , ( ) => doctor . getInfos ( ) ) ;
@@ -42,15 +42,15 @@ class DoctorService implements IDoctorService {
4242 if ( hasWarnings ) {
4343 this . $logger . info ( "There seem to be issues with your configuration." ) ;
4444 await this . promptForHelp ( ) ;
45+ } else {
46+ this . $logger . out ( "No issues were detected." . bold ) ;
4547 }
4648
4749 try {
4850 await this . $versionsService . checkComponentsForUpdate ( ) ;
4951 } catch ( err ) {
5052 this . $logger . error ( "Cannot get the latest versions information from npm. Please try again later." ) ;
5153 }
52-
53- return hasWarnings ;
5454 }
5555
5656 public runSetupScript ( ) : Promise < ISpawnResult > {
@@ -70,10 +70,8 @@ class DoctorService implements IDoctorService {
7070 }
7171
7272 public async canExecuteLocalBuild ( platform ?: string ) : Promise < boolean > {
73- let infos = await doctor . getInfos ( ) ;
74- if ( platform ) {
75- infos = this . filterInfosByPlatform ( infos , platform ) ;
76- }
73+ const infos = await doctor . getInfos ( { platform } ) ;
74+ this . printInfosCore ( infos ) ;
7775
7876 const warnings = this . filterInfosByType ( infos , constants . WARNING_TYPE_NAME ) ;
7977 if ( warnings . length > 0 ) {
@@ -149,10 +147,6 @@ class DoctorService implements IDoctorService {
149147 } ) ;
150148 }
151149
152- private filterInfosByPlatform ( infos : NativeScriptDoctor . IInfo [ ] , platform : string ) : NativeScriptDoctor . IInfo [ ] {
153- return infos . filter ( info => _ . includes ( info . platforms , platform ) ) ;
154- }
155-
156150 private filterInfosByType ( infos : NativeScriptDoctor . IInfo [ ] , type : string ) : NativeScriptDoctor . IInfo [ ] {
157151 return infos . filter ( info => info . type === type ) ;
158152 }
0 commit comments