Add newline after version printout (#4508)

This commit is contained in:
Stefan Stanciulescu 2022-02-17 13:29:58 +01:00 committed by GitHub
parent 6e733f49bc
commit d50ccdf083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,10 +294,11 @@ fn parse_commandline_args(
}
if call.has_flag("version") {
let version = env!("CARGO_PKG_VERSION").to_string();
let _ = std::panic::catch_unwind(move || {
let stdout = std::io::stdout();
let mut stdout = stdout.lock();
let _ = stdout.write_all(env!("CARGO_PKG_VERSION").to_string().as_bytes());
let _ = stdout.write_all(format!("{}\n", version).as_bytes());
});
std::process::exit(0);