simple eprintln! fixes

This commit is contained in:
Crypto-Spartan 2021-12-08 18:25:41 +00:00
parent b50987840e
commit cd0a58d27e
2 changed files with 3 additions and 3 deletions

View File

@ -55,12 +55,12 @@ pub fn _info_helper(handle: &mut impl std::io::Write) {
write!(handle, "{}[INFO]{} ", *YELLOW, *RESET).unwrap(); write!(handle, "{}[INFO]{} ", *YELLOW, *RESET).unwrap();
} }
/// Macro that prints \[WARNING\] messages, wraps [`println`]. /// Macro that prints \[WARNING\] messages, wraps [`eprintln`].
#[macro_export] #[macro_export]
macro_rules! warning { macro_rules! warning {
($($arg:tt)*) => { ($($arg:tt)*) => {
$crate::macros::_warning_helper(); $crate::macros::_warning_helper();
println!($($arg)*); eprintln!($($arg)*);
}; };
} }

View File

@ -2,7 +2,7 @@ use ouch::{commands, Opts, Result};
fn main() { fn main() {
if let Err(err) = run() { if let Err(err) = run() {
println!("{}", err); eprintln!("{}", err);
std::process::exit(ouch::EXIT_FAILURE); std::process::exit(ouch::EXIT_FAILURE);
} }
} }