7
7
private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
8
8
private $config : IConfiguration ,
9
9
private $usbLiveSyncService : ILiveSyncService ,
10
- private $platformService : IPlatformService ,
11
- protected $options : IOptions ) { }
10
+ protected $platformService : IPlatformService ,
11
+ protected $options : IOptions ,
12
+ protected $platformsData : IPlatformsData ) { }
12
13
13
14
execute ( args : string [ ] ) : IFuture < void > {
14
15
if ( this . $options . start ) {
@@ -67,8 +68,16 @@ export class DebugIOSCommand extends DebugPlatformCommand {
67
68
$config : IConfiguration ,
68
69
$usbLiveSyncService : ILiveSyncService ,
69
70
$platformService : IPlatformService ,
70
- $options : IOptions ) {
71
- super ( $iOSDebugService , $devicesService , $injector , $logger , $childProcess , $devicePlatformsConstants , $config , $usbLiveSyncService , $platformService , $options ) ;
71
+ $options : IOptions ,
72
+ $platformsData : IPlatformsData ) {
73
+
74
+ super ( $iOSDebugService , $devicesService , $injector , $logger , $childProcess , $devicePlatformsConstants , $config , $usbLiveSyncService , $platformService , $options , $platformsData ) ;
75
+ }
76
+
77
+ canExecute ( args : string [ ] ) : IFuture < boolean > {
78
+ return ( ( ) => {
79
+ return super . canExecute ( args ) . wait ( ) && this . $platformService . validateOptions ( this . $platformsData . availablePlatforms . iOS ) . wait ( ) ;
80
+ } ) . future < boolean > ( ) ( ) ;
72
81
}
73
82
}
74
83
$injector . registerCommand ( "debug|ios" , DebugIOSCommand ) ;
@@ -83,8 +92,16 @@ export class DebugAndroidCommand extends DebugPlatformCommand {
83
92
$config : IConfiguration ,
84
93
$usbLiveSyncService : ILiveSyncService ,
85
94
$platformService : IPlatformService ,
86
- $options : IOptions ) {
87
- super ( $androidDebugService , $devicesService , $injector , $logger , $childProcess , $devicePlatformsConstants , $config , $usbLiveSyncService , $platformService , $options ) ;
95
+ $options : IOptions ,
96
+ $platformsData : IPlatformsData ) {
97
+
98
+ super ( $androidDebugService , $devicesService , $injector , $logger , $childProcess , $devicePlatformsConstants , $config , $usbLiveSyncService , $platformService , $options , $platformsData ) ;
99
+ }
100
+
101
+ canExecute ( args : string [ ] ) : IFuture < boolean > {
102
+ return ( ( ) => {
103
+ return super . canExecute ( args ) . wait ( ) && this . $platformService . validateOptions ( this . $platformsData . availablePlatforms . Android ) . wait ( ) ;
104
+ } ) . future < boolean > ( ) ( ) ;
88
105
}
89
106
}
90
107
$injector . registerCommand ( "debug|android" , DebugAndroidCommand ) ;
0 commit comments