Skip to content

Commit

Permalink
fix macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m authored and andrehjr committed Jul 6, 2019
1 parent 1de42ff commit f0e45bf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/tools/rustbook/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use mdbook_1::errors::{Result as Result1};

use mdbook::MDBook;
use mdbook::errors::{Result as Result3};

#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
use mdbook::renderer::RenderContext;

#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
Expand Down Expand Up @@ -79,9 +81,12 @@ fn main() {
if let Err(err) = linkcheck(sub_matches) {
eprintln!("Error: {}", err);

if let Ok(broken_links) = err.downcast::<BrokenLinks>() {
for cause in broken_links.links().iter() {
eprintln!("\tCaused By: {}", cause);
#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
{
if let Ok(broken_links) = err.downcast::<BrokenLinks>() {
for cause in broken_links.links().iter() {
eprintln!("\tCaused By: {}", cause);
}
}
}

Expand Down

0 comments on commit f0e45bf

Please sign in to comment.