Skip to content

Commit 206914f

Browse files
authored
fix(cli): adb reverse failing in Node.js (#10466)
1 parent 005e4a9 commit 206914f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changes/fix-adb.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-cli": patch:bug
3+
"@tauri-apps/cli": patch:bug
4+
---
5+
6+
Fixes running `adb reverse` in Node.js context.

tooling/cli/src/mobile/android/dev.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ fn run_dev(
218218
.clone();
219219
if let Some(port) = dev_url.and_then(|url| url.port_or_known_default()) {
220220
let forward = format!("tcp:{port}");
221-
adb::adb(&env, ["reverse", &forward, &forward]).run()?;
221+
adb::adb(&env, ["reverse", &forward, &forward])
222+
.stdin_file(os_pipe::dup_stdin().unwrap())
223+
.stdout_file(os_pipe::dup_stdout().unwrap())
224+
.stderr_capture()
225+
.run()?;
222226
}
223227

224228
let open = options.open;

0 commit comments

Comments
 (0)