From 3ee0fbfea9eb40050558fea242ecb90601de3b65 Mon Sep 17 00:00:00 2001 From: fdai7451 Date: Thu, 19 Jan 2023 13:37:07 +0100 Subject: [PATCH] fix: use eprintln to print errors --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index e63c625..f3fa492 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,7 +29,7 @@ fn main() -> Result<()> { break; } Err(ShellError::NotFound(cmd)) => { - println!("{}: command not found", cmd.get_program().to_string_lossy()) + eprintln!("{}: command not found", cmd.get_program().to_string_lossy()) } Err(ShellError::ExecuteFailure(msg)) => { eprintln!("{}", msg) @@ -39,7 +39,7 @@ fn main() -> Result<()> { break; } Err(err) => { - println!("Error: {:?}", err); + eprintln!("Error: {:?}", err); break; } }