1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-06 01:20:59 +02:00

Add newline after version printout ()

This commit is contained in:
Stefan Stanciulescu
2022-02-17 13:29:58 +01:00
committed by GitHub
parent 6e733f49bc
commit d50ccdf083

@ -294,10 +294,11 @@ fn parse_commandline_args(
} }
if call.has_flag("version") { if call.has_flag("version") {
let version = env!("CARGO_PKG_VERSION").to_string();
let _ = std::panic::catch_unwind(move || { let _ = std::panic::catch_unwind(move || {
let stdout = std::io::stdout(); let stdout = std::io::stdout();
let mut stdout = stdout.lock(); 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); std::process::exit(0);