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();
|
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)*);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user