From 93a88b35c36e64126928989e8edb22469b38c77b Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Wed, 16 Feb 2022 20:26:07 -0500 Subject: [PATCH] feat: add version flag --- Cargo.lock | 1 + Cargo.toml | 2 +- front/Cargo.lock | 1 + src/cli.rs | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index fe1a506..01be4e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,6 +62,7 @@ dependencies = [ "atty", "bitflags", "indexmap", + "lazy_static", "os_str_bytes", "strsim", "termcolor", diff --git a/Cargo.toml b/Cargo.toml index 566e377..cf729da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [dependencies] -clap = "*" +clap = { version = "*", features = ["cargo"] } indoc = "*" rand = "*" rayon = "*" diff --git a/front/Cargo.lock b/front/Cargo.lock index ef89027..f6810e0 100644 --- a/front/Cargo.lock +++ b/front/Cargo.lock @@ -85,6 +85,7 @@ dependencies = [ "atty", "bitflags", "indexmap", + "lazy_static", "os_str_bytes", "strsim", "termcolor", diff --git a/src/cli.rs b/src/cli.rs index aa00452..c26f270 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,6 +1,7 @@ pub fn parse(args: Vec) -> clap::ArgMatches { clap::App::new("Alejandra") .about("The Uncompromising Nix Code Formatter.") + .version(clap::crate_version!()) .arg( clap::Arg::new("debug") .help("Enable debug mode.")