summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2022-11-11 20:08:00 +0200
committerManos Pitsidianakis <el13635@mail.ntua.gr>2022-11-11 20:08:00 +0200
commitdb227dea34caa747e136500356fddf95a91002e6 (patch)
treea145b74bfba88b6cd97b5faa92d2a1b15ddb39e0
parent282af86e83807772f042b115af24ffe2e0575b9e (diff)
downloadmeli-db227dea34caa747e136500356fddf95a91002e6.zip
build.rs: add error messages if `mandoc`,`man` binaries are missing
-rw-r--r--build.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/build.rs b/build.rs
index 0c181ec2..a1c3eae7 100644
--- a/build.rs
+++ b/build.rs
@@ -56,9 +56,12 @@ fn main() {
.arg(filepath)
.output()
.or_else(|_| Command::new("man").arg("-l").arg(filepath).output())
- .unwrap();
+ .expect(
+ "could not execute `mandoc` or `man`. If the binaries are not available in the PATH, disable `cli-docs` feature to be able to continue compilation.",
+ );
- let file = File::create(&out_dir_path).unwrap();
+ let file = File::create(&out_dir_path)
+ .expect(&format!("Could not create file {}", out_dir_path.display()));
let mut gz = GzBuilder::new()
.comment(output.stdout.len().to_string().into_bytes())
.write(file, Compression::default());