From 6c846299c81b419973e2bb4d40e3d142998fb66c Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Thu, 5 Aug 2021 22:24:14 -0400 Subject: [PATCH] Print a newline after the --version Otherwise various shells are unhappy --- cli/Cargo.toml | 2 +- cli/src/lib.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 5d1d5b165d..8288d26d6f 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -57,7 +57,7 @@ roc_reporting = { path = "../compiler/reporting" } roc_editor = { path = "../editor", optional = true } # TODO switch to clap 3.0.0 once it's out. Tried adding clap = "~3.0.0-beta.1" and cargo wouldn't accept it clap = { git = "https://github.com/rtfeldman/clap", branch = "master" } -const_format = "0.2.8" +const_format = "0.2" rustyline = { git = "https://github.com/rtfeldman/rustyline", tag = "prompt-fix" } rustyline-derive = { git = "https://github.com/rtfeldman/rustyline", tag = "prompt-fix" } im = "14" # im and im-rc should always have the same version! diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 64956980d8..a5d38c80e3 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -1,6 +1,9 @@ #[macro_use] extern crate clap; +#[macro_use] +extern crate const_format; + use build::{BuildOutcome, BuiltFile}; use bumpalo::Bump; use clap::{App, AppSettings, Arg, ArgMatches}; @@ -32,7 +35,7 @@ pub const ARGS_FOR_APP: &str = "ARGS_FOR_APP"; pub fn build_app<'a>() -> App<'a> { let app = App::new("roc") - .version(crate_version!()) + .version(concatcp!(crate_version!(), "\n")) .subcommand(App::new(CMD_BUILD) .about("Build a program") .arg(