We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dce1019 commit eb391e2Copy full SHA for eb391e2
src/main.rs
@@ -24,15 +24,9 @@ use std::io::{prelude::*, stdin};
24
use std::path::PathBuf;
25
use std::process::Command;
26
use std::{fs, io};
27
-use std::sync::OnceLock;
28
29
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
- }
+ built_info::GIT_VERSION.unwrap_or(built_info::PKG_VERSION)
36
}
37
38
#[derive(Parser, Clone, Debug)]
0 commit comments