Skip to content

Commit a32bab4

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Ability to specify android debug ui not only on OSX
Fixes #923
1 parent 5b07c7f commit a32bab4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class Configuration extends configBaseLib.ConfigBase implements IConfigur
1010
DEBUG = false;
1111
TYPESCRIPT_COMPILER_OPTIONS = {};
1212
USE_PROXY = false;
13-
ANDROID_DEBUG_UI_MAC = "Google Chrome";
13+
ANDROID_DEBUG_UI: string = null;
1414

1515
/*don't require logger and everything that has logger as dependency in config.js due to cyclic dependency*/
1616
constructor(protected $fs: IFileSystem) {

lib/declarations.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ interface IDependencyData {
3535
interface IStaticConfig extends Config.IStaticConfig { }
3636

3737
interface IConfiguration extends Config.IConfig {
38-
ANDROID_DEBUG_UI_MAC: string;
38+
ANDROID_DEBUG_UI: string;
3939
}
4040

4141
interface IApplicationPackage {

lib/services/android-debug-service.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ class AndroidDebugService implements IDebugService {
170170
}
171171

172172
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 = this.$hostInfo.isDarwin ? "Google Chrome" : "chrome";
174+
let debugUI = this.$config.ANDROID_DEBUG_UI || defaultDebugUI;
175+
let child = this.$opener.open(url, debugUI);
175176
if(!child) {
176-
this.$errors.fail(`Unable to open ${chrome}.`);
177+
this.$errors.failWithoutHelp(`Unable to open ${debugUI}.`);
177178
}
178-
return child;
179179
}
180180

181181
private checkIfRunning(packageName: string): boolean {

0 commit comments

Comments
 (0)