fix force output stdout and stderr.

This commit is contained in:
2024-09-29 14:49:15 +08:00
parent 81bcb8f543
commit 77a7b7679a
3 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
use std::io;
use std::path::Path;
use std::process::Command;
use std::process::{Command, Stdio};
pub fn unar_file(path: &Path) -> io::Result<()> {
println!("UNAR: {}", path.display());
@@ -16,6 +16,8 @@ pub fn unar_file(path: &Path) -> io::Result<()> {
.current_dir(parent_dir)
.arg("-s") // -force-skip: skip if exists
.arg(filename)
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.spawn()?.wait_with_output();
match output {