mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
split: remove crash macro
This commit is contained in:
parent
a3af2230a6
commit
c4580df2a4
1 changed files with 7 additions and 3 deletions
|
@ -7,9 +7,10 @@ use std::io::Write;
|
|||
use std::io::{BufWriter, Error, ErrorKind, Result};
|
||||
use std::path::Path;
|
||||
use std::process::{Child, Command, Stdio};
|
||||
use uucore::crash;
|
||||
use uucore::error::USimpleError;
|
||||
use uucore::fs;
|
||||
use uucore::fs::FileInformation;
|
||||
use uucore::show;
|
||||
|
||||
/// A writer that writes to a shell_process' stdin
|
||||
///
|
||||
|
@ -101,10 +102,13 @@ impl Drop for FilterWriter {
|
|||
.expect("Couldn't wait for child process");
|
||||
if let Some(return_code) = exit_status.code() {
|
||||
if return_code != 0 {
|
||||
crash!(1, "Shell process returned {}", return_code);
|
||||
show!(USimpleError::new(
|
||||
1,
|
||||
format!("Shell process returned {}", return_code)
|
||||
));
|
||||
}
|
||||
} else {
|
||||
crash!(1, "Shell process terminated by signal")
|
||||
show!(USimpleError::new(1, "Shell process terminated by signal"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue