fix macos build

This commit is contained in:
Mark Mansi 2019-07-04 20:20:14 -05:00 committed by André Luis Leal Cardoso Junior
parent 1de42ff95a
commit f0e45bfe81

View File

@ -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"))]
@ -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);
}
}
}