From d779e85ed34f513c3f225daaa4c9d804600de22d Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Wed, 7 Sep 2022 18:35:34 +0200 Subject: [PATCH] Wait for `logcat` to exit (use ^C as usual) instead of leaving the process linger in the background with the ability to emit more lines to stdout --- cargo-apk/src/apk.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cargo-apk/src/apk.rs b/cargo-apk/src/apk.rs index 971be26b..ad1ca699 100644 --- a/cargo-apk/src/apk.rs +++ b/cargo-apk/src/apk.rs @@ -246,15 +246,14 @@ impl<'a> ApkBuilder<'a> { apk.install(self.device_serial.as_deref())?; let pid = apk.start(self.device_serial.as_deref())?; - let _handle = self - .ndk + self.ndk .adb(self.device_serial.as_deref())? .arg("logcat") .arg("-v") .arg("color") .arg("--pid") .arg(pid.to_string()) - .spawn()?; + .status()?; Ok(()) }