Merge pull request #226 from Crypto-Spartan/eprint-fix

simple eprintln fixes
This commit is contained in:
João Marcos Bezerra 2021-12-09 17:53:13 -03:00 committed by GitHub
commit f40f40cda0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();
}
/// 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)*);
};
}

View File

@ -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);
}
}