summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2025-09-12 22:44:32 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2025-10-09 10:40:59 +0200
commit5aa9070f76bc1500b99a20a88ac21c3ea613dec7 (patch)
treedf89d52ac1110695ad2cb76d13036ceed5657e26
parentf205035dd43679c6676c6b6a0dfdf18c5b9f2105 (diff)
downloadmullvadvpn-5aa9070f76bc1500b99a20a88ac21c3ea613dec7.tar.xz
mullvadvpn-5aa9070f76bc1500b99a20a88ac21c3ea613dec7.zip
Remove `duct` from `mullvad-problem-report`
-rw-r--r--Cargo.lock1
-rw-r--r--mullvad-problem-report/Cargo.toml3
-rw-r--r--mullvad-problem-report/src/lib.rs17
3 files changed, 12 insertions, 9 deletions
diff --git a/Cargo.lock b/Cargo.lock
index fc683a8d41..32668c73e4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3281,7 +3281,6 @@ version = "0.0.0"
dependencies = [
"clap",
"dirs",
- "duct",
"env_logger 0.11.7",
"log",
"mullvad-api",
diff --git a/mullvad-problem-report/Cargo.toml b/mullvad-problem-report/Cargo.toml
index 2e969f6d0c..1080d9be70 100644
--- a/mullvad-problem-report/Cargo.toml
+++ b/mullvad-problem-report/Cargo.toml
@@ -28,9 +28,6 @@ talpid-platform-metadata = { path = "../talpid-platform-metadata" }
clap = { workspace = true }
env_logger = { workspace = true }
-[target.'cfg(target_os = "android")'.dependencies]
-duct = "0.13"
-
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
mullvad-version = { path = "../mullvad-version" }
diff --git a/mullvad-problem-report/src/lib.rs b/mullvad-problem-report/src/lib.rs
index 73b0881063..396ac4a98b 100644
--- a/mullvad-problem-report/src/lib.rs
+++ b/mullvad-problem-report/src/lib.rs
@@ -247,13 +247,20 @@ fn is_tunnel_log(path: &Path) -> bool {
#[cfg(target_os = "android")]
fn write_logcat_to_file(log_dir: &Path) -> Result<PathBuf, io::Error> {
+ use std::process::{Command, Stdio};
+
let logcat_path = log_dir.join("logcat.txt");
+ let logcat_file = File::create(&logcat_path)?;
+ let _stderr = logcat_file.try_clone()?;
+ let stdout = Stdio::from(logcat_file);
+ let stderr = Stdio::from(_stderr);
- duct::cmd!("logcat", "-d")
- .stderr_to_stdout()
- .stdout_path(&logcat_path)
- .run()
- .map(|_| logcat_path)
+ let _output = Command::new("logcat")
+ .arg("-d")
+ .stdout(stdout)
+ .stderr(stderr)
+ .output()?;
+ Ok(logcat_path)
}
pub fn send_problem_report(