Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Simplify the version tauri command
Sebastian Martinez committed 11 months ago
commit 2ae7b65674b87b3ab5ad2885edd4a77406f2165c
parent ff13c1e
1 file changed +2 -9
modified crates/radicle-tauri/src/commands/startup.rs
@@ -29,16 +29,9 @@ impl Serialize for Version {

#[tauri::command]
pub(crate) fn version(app: AppHandle) -> Result<Version, Error> {
-
    let version = app
-
        .config()
-
        .version
-
        .clone()
-
        .expect("The build version has not been set.");
-
    pub const GIT_HEAD: &str = env!("GIT_HEAD");
-

    Ok(Version {
-
        version,
-
        head: GIT_HEAD.to_string(),
+
        version: app.config().version.clone().unwrap_or("unknown".into()),
+
        head: env!("GIT_HEAD").to_string(),
    })
}