Skip to content

Commit

Permalink
build: Don't fail on manpage build error
Browse files Browse the repository at this point in the history
Instead, just make note that the manpage was unable to be generated

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
  • Loading branch information
tylerfanelli committed Jul 10, 2023
1 parent 4c35b91 commit 90fc46c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ fn main() {

for command in COMMANDS {
if let Err(err) = generate_man_page(&outdir, command) {
panic!("failed to generate man page: {}", err);
println!(
"failed to generate man page: {} (is asciidoctor installed?)",
err
);
}
}
}

fn generate_man_page<P: AsRef<Path>>(outdir: P, command: &str) -> io::Result<()> {
// If asciidoctor isn't installed, fallback to asciidoc.
if let Err(err) = process::Command::new("asciidoctor").output() {
eprintln!("Error from running 'asciidoctor': {}", err);
return Err(err);
Expand Down

0 comments on commit 90fc46c

Please sign in to comment.