mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-08 12:35:41 +00:00
simple eprintln! fixes
This commit is contained in:
parent
b50987840e
commit
cd0a58d27e
@ -55,12 +55,12 @@ pub fn _info_helper(handle: &mut impl std::io::Write) {
|
||||
write!(handle, "{}[INFO]{} ", *YELLOW, *RESET).unwrap();
|
||||
}
|
||||
|
||||
/// Macro that prints \[WARNING\] messages, wraps [`println`].
|
||||
/// Macro that prints \[WARNING\] messages, wraps [`eprintln`].
|
||||
#[macro_export]
|
||||
macro_rules! warning {
|
||||
($($arg:tt)*) => {
|
||||
$crate::macros::_warning_helper();
|
||||
println!($($arg)*);
|
||||
eprintln!($($arg)*);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ use ouch::{commands, Opts, Result};
|
||||
|
||||
fn main() {
|
||||
if let Err(err) = run() {
|
||||
println!("{}", err);
|
||||
eprintln!("{}", err);
|
||||
std::process::exit(ouch::EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user