diff --git a/yazi-core/src/external/jq.rs b/yazi-core/src/external/jq.rs index dd1c87ea..7286f803 100644 --- a/yazi-core/src/external/jq.rs +++ b/yazi-core/src/external/jq.rs @@ -7,7 +7,7 @@ use yazi_shared::PeekError; pub async fn jq(path: &Path, skip: usize, limit: usize) -> Result { let mut child = Command::new("jq") - .args(["-C", "--indent", "-1", "."]) + .args(["-C", "--tab", "."]) .arg(path) .stdout(Stdio::piped()) .stderr(Stdio::piped()) @@ -32,9 +32,8 @@ pub async fn jq(path: &Path, skip: usize, limit: usize) -> Result { - return Err("parse error".into()); - } + Ok(_) = stderr.read_u8() => return Err("parse error".into()), + else => {} } }