Skip to content

Commit

Permalink
fix(cli): adb reverse failing in Node.js (#10466)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Aug 3, 2024
1 parent 005e4a9 commit 206914f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/fix-adb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---

Fixes running `adb reverse` in Node.js context.
6 changes: 5 additions & 1 deletion tooling/cli/src/mobile/android/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,11 @@ fn run_dev(
.clone();
if let Some(port) = dev_url.and_then(|url| url.port_or_known_default()) {
let forward = format!("tcp:{port}");
adb::adb(&env, ["reverse", &forward, &forward]).run()?;
adb::adb(&env, ["reverse", &forward, &forward])
.stdin_file(os_pipe::dup_stdin().unwrap())
.stdout_file(os_pipe::dup_stdout().unwrap())
.stderr_capture()
.run()?;
}

let open = options.open;
Expand Down

0 comments on commit 206914f

Please sign in to comment.