@@ -28,12 +28,13 @@ export async function doctorCore(config: Config) {
28
28
let iosVersion = await runCommand ( `npm info @capacitor/ios version` ) ;
29
29
30
30
log ( `${ chalk . bold . blue ( 'Latest Dependencies:' ) } \n` ) ;
31
- log ( ` ${ chalk . bold ( '@capacitor/cli:' ) } ` , cliVersion ) ;
32
- log ( ` ${ chalk . bold ( '@capacitor/core:' ) } ` , coreVersion ) ;
33
- log ( ` ${ chalk . bold ( '@capacitor/android:' ) } ` , androidVersion ) ;
34
- log ( ` ${ chalk . bold ( '@capacitor/electron:' ) } ` , electronVersion ) ;
35
- log ( ` ${ chalk . bold ( '@capacitor/ios:' ) } ` , iosVersion ) ;
31
+ log ( ` ${ chalk . bold ( '@capacitor/cli:' ) } ` , cliVersion . trim ( ) ) ;
32
+ log ( ` ${ chalk . bold ( '@capacitor/core:' ) } ` , coreVersion . trim ( ) ) ;
33
+ log ( ` ${ chalk . bold ( '@capacitor/android:' ) } ` , androidVersion . trim ( ) ) ;
34
+ log ( ` ${ chalk . bold ( '@capacitor/electron:' ) } ` , electronVersion . trim ( ) ) ;
35
+ log ( ` ${ chalk . bold ( '@capacitor/ios:' ) } ` , iosVersion . trim ( ) ) ;
36
36
37
+ log ( '' ) ;
37
38
log ( `${ chalk . bold . blue ( 'Installed Dependencies:' ) } \n` ) ;
38
39
39
40
await printInstalledPackages ( config ) ;
@@ -45,10 +46,10 @@ async function printInstalledPackages(config: Config) {
45
46
const packageNames = [ '@capacitor/cli' , '@capacitor/core' , '@capacitor/android' , '@capacitor/ios' ] ;
46
47
await Promise . all ( packageNames . map ( async packageName => {
47
48
const packagePath = resolveNode ( config , packageName , 'package.json' ) ;
48
- printPackageVersion ( packageName , packagePath ) ;
49
+ await printPackageVersion ( packageName , packagePath ) ;
49
50
} ) ) ;
50
51
const packagePath = resolveNodeFrom ( config . electron . platformDir , '@capacitor/electron' ) ;
51
- printPackageVersion ( '@capacitor/electron' , packagePath ? join ( packagePath , 'package.json' ) : packagePath ) ;
52
+ await printPackageVersion ( '@capacitor/electron' , packagePath ? join ( packagePath , 'package.json' ) : packagePath ) ;
52
53
}
53
54
54
55
async function printPackageVersion ( packageName : string , packagePath : string | null ) {
@@ -57,7 +58,6 @@ async function printPackageVersion(packageName: string, packagePath: string | nu
57
58
version = ( await readJSON ( packagePath ) ) . version ;
58
59
}
59
60
log ( ` ${ chalk . bold ( packageName ) } ` , version || 'not installed' ) ;
60
- log ( '' ) ;
61
61
}
62
62
63
63
export async function doctor ( config : Config , platformName : string ) {
0 commit comments