Skip to content

Commit

Permalink
Fix minimal-application build
Browse files Browse the repository at this point in the history
  • Loading branch information
Enselic committed Oct 23, 2021
1 parent 9291a79 commit 9cd790c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/bin/bat/clap_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ use std::env;
use std::path::Path;

lazy_static::lazy_static! {
pub static ref VERSION: String = match bugreport::git_version!(fallback = "") {
git_version if !git_version.is_empty() => {
pub static ref VERSION: String = {
#[cfg(feature = "bugreport")]
let git_version = bugreport::git_version!(fallback = "");
#[cfg(not(feature = "bugreport"))]
let git_version = "";

if git_version.is_empty() {
crate_version!().to_string()
} else {
format!("{} ({})", crate_version!(), git_version)
}
_ => crate_version!().to_string(),
};
}

Expand Down

0 comments on commit 9cd790c

Please sign in to comment.