Skip to content

Commit

Permalink
Merge pull request #226 from Crypto-Spartan/eprint-fix
Browse files Browse the repository at this point in the history
simple eprintln fixes
  • Loading branch information
marcospb19 authored Dec 9, 2021
2 parents 9c34469 + cd0a58d commit f40f40c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)*);
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit f40f40c

Please sign in to comment.