build.rs: Panic if version could not be found

We don't want "fish --version" to print "unknown" or any other fake version
This commit is contained in:
Fabian Boehm 2024-11-20 19:42:16 +01:00
parent e24823dd6c
commit 5abd0e46f5

View File

@ -283,7 +283,6 @@ fn get_version(src_dir: &Path) -> String {
return version + "-g" + &rev;
}
}
// TODO: Do we just use the cargo version here?
"unknown".to_string()
panic!("Could not get a version. Either set $FISH_BUILD_VERSION or install git.");
}