fix(cli): adb reverse failing in Node.js (#10466)

This commit is contained in:
Lucas Fernandes Nogueira 2024-08-03 09:47:50 -03:00 committed by GitHub
parent 005e4a9649
commit 206914fe8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

6
.changes/fix-adb.md Normal file
View File

@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes running `adb reverse` in Node.js context.

View File

@ -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;