From 79aa077d39d83828618638b0e9c250aa6568eeff Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 15 Mar 2024 20:18:13 +0800 Subject: [PATCH] .. --- yazi-plugin/src/external/fd.rs | 4 +--- yazi-plugin/src/external/rg.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/yazi-plugin/src/external/fd.rs b/yazi-plugin/src/external/fd.rs index 55f7d72f..4fced261 100644 --- a/yazi-plugin/src/external/fd.rs +++ b/yazi-plugin/src/external/fd.rs @@ -20,11 +20,9 @@ pub fn fd(opt: FdOpt) -> Result> { .arg(&opt.subject) .kill_on_drop(true) .stdout(Stdio::piped()) - .stderr(Stdio::piped()) + .stderr(Stdio::null()) .spawn()?; - drop(child.stderr.take()); - let mut it = BufReader::new(child.stdout.take().unwrap()).lines(); let (tx, rx) = mpsc::unbounded_channel(); diff --git a/yazi-plugin/src/external/rg.rs b/yazi-plugin/src/external/rg.rs index 3367f53c..b37a3235 100644 --- a/yazi-plugin/src/external/rg.rs +++ b/yazi-plugin/src/external/rg.rs @@ -18,11 +18,9 @@ pub fn rg(opt: RgOpt) -> Result> { .arg(&opt.subject) .kill_on_drop(true) .stdout(Stdio::piped()) - .stderr(Stdio::piped()) + .stderr(Stdio::null()) .spawn()?; - drop(child.stderr.take()); - let mut it = BufReader::new(child.stdout.take().unwrap()).lines(); let (tx, rx) = mpsc::unbounded_channel();