Use a timeout on netaddr
Use a timeout on netaddr so that fargo run doesn’t hang
if there is no device.
Change-Id: I70b4379ca2e11194b16e64365fa98d45c6a26799
diff --git a/Cargo.lock b/Cargo.lock
index b9dffab..c25d807 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,3 +1,5 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
[[package]]
name = "adler32"
version = "1.0.2"
diff --git a/src/device.rs b/src/device.rs
index cf87caa..22d0af4 100644
--- a/src/device.rs
+++ b/src/device.rs
@@ -13,7 +13,7 @@
pub fn netaddr(verbose: bool, target_options: &TargetOptions<'_, '_>) -> Result<String, Error> {
let fuchsia_dir = fuchsia_dir()?;
let netaddr_binary = fuchsia_dir.join("out/build-zircon/tools/netaddr");
- let mut args = vec!["--fuchsia"];
+ let mut args = vec!["--fuchsia", "--timeout=500", "--nowait"];
if let Some(device_name) = target_options.device_name {
args.push(device_name);
}