Skip to content

Commit

Permalink
stdbuf: remove set_exit_code line from error
Browse files Browse the repository at this point in the history
  • Loading branch information
cswn committed Nov 17, 2023
1 parent 26df944 commit 92ff6f4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/uu/stdbuf/src/stdbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::path::PathBuf;
use std::process;
use tempfile::tempdir;
use tempfile::TempDir;
use uucore::error::{set_exit_code, FromIo, UResult, USimpleError, UUsageError};
use uucore::error::{FromIo, UResult, USimpleError, UUsageError};
use uucore::parse_size::parse_size_u64;
use uucore::{format_usage, help_about, help_section, help_usage};

Expand Down Expand Up @@ -103,10 +103,7 @@ fn check_option(matches: &ArgMatches, name: &str) -> Result<BufferType, ProgramO
}
}
x => parse_size_u64(x).map_or_else(
|e| {
set_exit_code(125);
Err(ProgramOptionsError(format!("invalid mode {e}")))
},
|e| Err(ProgramOptionsError(format!("invalid mode {e}"))),
|m| {
Ok(BufferType::Size(m.try_into().map_err(|_| {
ProgramOptionsError(format!(
Expand Down

0 comments on commit 92ff6f4

Please sign in to comment.