File tree 3 files changed +13
-6
lines changed
3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export class Configuration extends configBaseLib.ConfigBase implements IConfigur
10
10
DEBUG = false ;
11
11
TYPESCRIPT_COMPILER_OPTIONS = { } ;
12
12
USE_PROXY = false ;
13
- ANDROID_DEBUG_UI_MAC = "Google Chrome" ;
13
+ ANDROID_DEBUG_UI : string = null ;
14
14
15
15
/*don't require logger and everything that has logger as dependency in config.js due to cyclic dependency*/
16
16
constructor ( protected $fs : IFileSystem ) {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ interface IDependencyData {
35
35
interface IStaticConfig extends Config . IStaticConfig { }
36
36
37
37
interface IConfiguration extends Config . IConfig {
38
- ANDROID_DEBUG_UI_MAC : string ;
38
+ ANDROID_DEBUG_UI : string ;
39
39
}
40
40
41
41
interface IApplicationPackage {
Original file line number Diff line number Diff line change @@ -170,12 +170,19 @@ class AndroidDebugService implements IDebugService {
170
170
}
171
171
172
172
private openDebuggerClient ( url : string ) : void {
173
- let chrome = this . $hostInfo . isDarwin ? this . $config . ANDROID_DEBUG_UI_MAC : "chrome" ;
174
- let child = this . $opener . open ( url , chrome ) ;
173
+ let defaultDebugUI = "chrome" ;
174
+ if ( this . $hostInfo . isDarwin ) {
175
+ defaultDebugUI = "Google Chrome" ;
176
+ }
177
+ if ( this . $hostInfo . isLinux ) {
178
+ defaultDebugUI = "google-chrome" ;
179
+ }
180
+
181
+ let debugUI = this . $config . ANDROID_DEBUG_UI || defaultDebugUI ;
182
+ let child = this . $opener . open ( url , debugUI ) ;
175
183
if ( ! child ) {
176
- this . $errors . fail ( `Unable to open ${ chrome } .` ) ;
184
+ this . $errors . failWithoutHelp ( `Unable to open ${ debugUI } .` ) ;
177
185
}
178
- return child ;
179
186
}
180
187
181
188
private checkIfRunning ( packageName : string ) : boolean {
You can’t perform that action at this time.
0 commit comments