mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 16:33:37 +01:00
Add newline after version printout (#4508)
This commit is contained in:
parent
6e733f49bc
commit
d50ccdf083
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user