From c4580df2a4cbb4f1cb4e3124779bde43d7b027f8 Mon Sep 17 00:00:00 2001 From: cswn Date: Tue, 14 Nov 2023 18:07:35 +0100 Subject: [PATCH] split: remove crash macro --- src/uu/split/src/platform/unix.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/uu/split/src/platform/unix.rs b/src/uu/split/src/platform/unix.rs index f4adb818834..c2bf7216b57 100644 --- a/src/uu/split/src/platform/unix.rs +++ b/src/uu/split/src/platform/unix.rs @@ -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")); } } }