fix force output stdout and stderr.
This commit is contained in:
parent
81bcb8f543
commit
77a7b7679a
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -4,4 +4,4 @@ version = 3
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unzip-all"
|
name = "unzip-all"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "unzip-all"
|
name = "unzip-all"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
authors = ["licsber <admin@licsber.site>"]
|
authors = ["licsber <admin@licsber.site>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use std::io;
|
use std::io;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
|
|
||||||
pub fn unar_file(path: &Path) -> io::Result<()> {
|
pub fn unar_file(path: &Path) -> io::Result<()> {
|
||||||
println!("UNAR: {}", path.display());
|
println!("UNAR: {}", path.display());
|
||||||
@ -16,6 +16,8 @@ pub fn unar_file(path: &Path) -> io::Result<()> {
|
|||||||
.current_dir(parent_dir)
|
.current_dir(parent_dir)
|
||||||
.arg("-s") // -force-skip: skip if exists
|
.arg("-s") // -force-skip: skip if exists
|
||||||
.arg(filename)
|
.arg(filename)
|
||||||
|
.stdout(Stdio::inherit())
|
||||||
|
.stderr(Stdio::inherit())
|
||||||
.spawn()?.wait_with_output();
|
.spawn()?.wait_with_output();
|
||||||
|
|
||||||
match output {
|
match output {
|
||||||
|
Loading…
Reference in New Issue
Block a user