]> Repositorios git - scryer-prolog.git/commitdiff
main: fix version reporting without git
authorStephan Renatus <[email protected]>
Mon, 13 Apr 2020 13:50:31 +0000 (15:50 +0200)
committerStephan Renatus <[email protected]>
Mon, 13 Apr 2020 13:50:33 +0000 (15:50 +0200)
Fixes #339.

At least I hope so. I didn't come up with an idea how to test this with
little effort.

Signed-off-by: Stephan Renatus <[email protected]>
src/main.rs

index a9b0546d47ba689bab235472c153b0d3d3c0e015..ca9ba05d857e870864669751050d56b90f182880 100644 (file)
@@ -36,7 +36,7 @@ fn main() {
     unsafe { signal::signal(signal::Signal::SIGINT, handler) }.unwrap();
 
     if env::args().skip(1).any(|a| a == "-v" || a == "--version") {
-        println!("{:}", git_version!());
+        println!("{:}", git_version!(cargo_prefix = "cargo:", fallback = "unknown"));
         return;
     }