Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Improve warning if asciidoctor is missing
Browse files Browse the repository at this point in the history
See GH-233
  • Loading branch information
swsnr committed Jan 8, 2023
1 parent a79ddb6 commit 931b294
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ fn build_manpage<P: AsRef<Path>>(out_dir: P) -> Result<()> {
.arg("-o")
.arg(target_file)
.arg("mdcat.1.adoc");
let result = command.spawn()?.wait()?;
let mut process = command.spawn().map_err(|err| match err.kind() {
ErrorKind::NotFound => Error::new(
ErrorKind::NotFound,
"asciidoctor not found; please install asciidoctor to build the manpage!",
),
_ => err,
})?;
let result = process.wait()?;

if result.success() {
Ok(())
Expand Down

0 comments on commit 931b294

Please sign in to comment.