mirror of
https://github.com/ouch-org/ouch.git
synced 2025-07-22 17:40:17 +00:00
Merge pull request #226 from Crypto-Spartan/eprint-fix
simple eprintln fixes
This commit is contained in:
commit
f40f40cda0
@ -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