aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-10-11 14:26:54 +0200
committerAlex Auvolat <alex@adnab.me>2021-10-11 14:26:54 +0200
commit1acf7e4c66aab0a0b5bcce8eb2965b35d587dd2a (patch)
tree93bd8b6320aa00b95d099073539e10206208f735 /src/garage
parentf6060b92aa2e8c26d3d1fddb5bb9823db05d4524 (diff)
downloadgarage-1acf7e4c66aab0a0b5bcce8eb2965b35d587dd2a.tar.gz
garage-1acf7e4c66aab0a0b5bcce8eb2965b35d587dd2a.zip
Fix git_version!() when not in git repo (fix #100)
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/admin_rpc.rs6
1 files changed, 5 insertions, 1 deletions
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();