@@ -5,28 +5,25 @@ export class MigrateCommand implements ICommand {
55 private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
66 private $migrateController : IMigrateController ,
77 private $projectData : IProjectData ,
8- private $errors : IErrors ) {
8+ private $logger : ILogger ) {
99 this . $projectData . initializeProjectData ( ) ;
1010 }
1111
1212 public async execute ( args : string [ ] ) : Promise < void > {
13- await this . $migrateController . migrate ( {
14- projectDir : this . $projectData . projectDir ,
15- platforms : [ this . $devicePlatformsConstants . Android , this . $devicePlatformsConstants . iOS ]
16- } ) ;
17- }
18-
19- public async canExecute ( args : string [ ] ) : Promise < boolean > {
2013 const shouldMigrateResult = await this . $migrateController . shouldMigrate ( {
2114 projectDir : this . $projectData . projectDir ,
2215 platforms : [ this . $devicePlatformsConstants . Android , this . $devicePlatformsConstants . iOS ]
2316 } ) ;
2417
2518 if ( ! shouldMigrateResult ) {
26- this . $errors . failWithoutHelp ( 'Project is compatible with NativeScript "v6.0.0". To get the latest NativesScript packages execute "tns update".' ) ;
19+ this . $logger . printMarkdown ( '__Project is compatible with NativeScript "v6.0.0". To get the latest NativeScript packages execute "tns update".__' ) ;
20+ return ;
2721 }
2822
29- return true ;
23+ await this . $migrateController . migrate ( {
24+ projectDir : this . $projectData . projectDir ,
25+ platforms : [ this . $devicePlatformsConstants . Android , this . $devicePlatformsConstants . iOS ]
26+ } ) ;
3027 }
3128}
3229
0 commit comments