Skip to content

Commit 98ce64c

Browse files
committed
pass arguments to getDebugPort to be able to specify --device correctly
1 parent eabfa5d commit 98ce64c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/project/androidProject.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ export class AndroidProject extends Project {
4343
return { tnsProcess: debugProcess, tnsOutputEventEmitter: tnsOutputEventEmitter };
4444
}
4545

46-
public getDebugPortSync(): number {
47-
let output = this.cli.executeSync(["debug", "android", "--get--port"], this.appRoot);
46+
public getDebugPortSync(tnsArgs?: string[]): number {
47+
let args: string[] = [];
48+
args = args.concat(tnsArgs);
49+
let output = this.cli.executeSync(["debug", "android", "--get--port"].concat(args), this.appRoot);
4850
let port = parseInt(output.match("(?:debug port: )([\\d]{5})")[1]);
4951
return port;
5052
}

0 commit comments

Comments
 (0)