diff --git a/src/servers/src/mysql/federated.rs b/src/servers/src/mysql/federated.rs index e3d4a8ce803e..80d0cb54ab94 100644 --- a/src/servers/src/mysql/federated.rs +++ b/src/servers/src/mysql/federated.rs @@ -323,10 +323,7 @@ pub(crate) fn check( // get GreptimeDB's version. fn get_version() -> String { - format!( - "{}-greptime", - env::var("CARGO_PKG_VERSION").unwrap_or_else(|_| "unknown".to_string()), - ) + format!("{}-greptime", env!("CARGO_PKG_VERSION")) } #[cfg(test)] mod test {