diff --git a/src/main.rs b/src/main.rs index 5811857..c71b222 100644 --- a/src/main.rs +++ b/src/main.rs @@ -337,7 +337,10 @@ fn format_address_table(m: &HashMap) -> String { } fn main() { - let version_string = format!("fox32asm {} ({})", env!("NIX_SEMVER"), env!("NIX_GIT_SHA_SHORT")); + let version_string = match (option_env!("NIX_SEMVER"), option_env!("NIX_GIT_SHA_SHORT")) { + (Some(semver), Some(sha)) => format!("fox32asm {semver} ({sha})"), + _ => format!("fox32asm (dev)"), + }; println!("{}", version_string); let args: Vec = env::args().collect();