Fix `rad --version` output

Write `rad --version` on its own line.
This commit is contained in:
Slack Coder 2023-04-19 08:46:06 -05:00
parent f26adabdbf
commit bd04826223
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -68,9 +68,9 @@ fn parse_args() -> anyhow::Result<Command> {
/// Third party applications use it to parse Radicle Cli's version.
fn print_version(mut w: impl std::io::Write) -> anyhow::Result<()> {
if VERSION.contains("-dev") {
write!(w, "{NAME} {VERSION}+{GIT_HEAD}")?;
writeln!(w, "{NAME} {VERSION}+{GIT_HEAD}")?;
} else {
write!(w, "{NAME} {VERSION} ({GIT_HEAD})")?;
writeln!(w, "{NAME} {VERSION} ({GIT_HEAD})")?;
}
Ok(())
}