Skip to content

Commit eb391e2

Browse files
committed
fix: wrong git version
1 parent dce1019 commit eb391e2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,9 @@ use std::io::{prelude::*, stdin};
2424
use std::path::PathBuf;
2525
use std::process::Command;
2626
use std::{fs, io};
27-
use std::sync::OnceLock;
2827

2928
fn get_version() -> &'static str {
30-
static VERSION: OnceLock<String> = OnceLock::new();
31-
if let Some(hash) = built_info::GIT_COMMIT_HASH_SHORT {
32-
VERSION.get_or_init(|| format!("{}-{}", built_info::PKG_VERSION, hash)).as_str()
33-
} else {
34-
built_info::PKG_VERSION
35-
}
29+
built_info::GIT_VERSION.unwrap_or(built_info::PKG_VERSION)
3630
}
3731

3832
#[derive(Parser, Clone, Debug)]

0 commit comments

Comments
 (0)