From 1acf7e4c66aab0a0b5bcce8eb2965b35d587dd2a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 11 Oct 2021 14:26:54 +0200 Subject: [PATCH] Fix git_version!() when not in git repo (fix #100) --- src/garage/admin_rpc.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/garage/admin_rpc.rs b/src/garage/admin_rpc.rs index b1538a30..19cba3b6 100644 --- a/src/garage/admin_rpc.rs +++ b/src/garage/admin_rpc.rs @@ -423,7 +423,11 @@ impl AdminRpcHandler { writeln!( &mut ret, "\nGarage version: {}", - git_version::git_version!() + git_version::git_version!( + prefix = "git:", + cargo_prefix = "cargo:", + fallback = "unknown" + ) ) .unwrap();