Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
with:
chrome-version: 'latest'
install-chromedriver: true
id: setup-chrome
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand Down
20 changes: 10 additions & 10 deletions plotly_static/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,19 @@ fn setup_driver(config: &WebdriverDownloadConfig) -> Result<()> {
match config.driver_name {
CHROMEDRIVER_NAME => {
let driver_info = ChromedriverInfo::new(webdriver_bin.clone(), browser_path);
runtime
.block_on(async { download_with_retry(&driver_info, false, true, 1).await })
.with_context(|| {
format!("Failed to download and install {}", config.driver_name)
})?;
let dl_res =
runtime.block_on(async { download_with_retry(&driver_info, false, true, 1).await });
if let Err(e) = dl_res {
return Err(anyhow!("Failed to download and install chromedriver").context(e));
}
}
GECKODRIVER_NAME => {
let driver_info = GeckodriverInfo::new(webdriver_bin.clone(), browser_path);
runtime
.block_on(async { download_with_retry(&driver_info, false, true, 1).await })
.with_context(|| {
format!("Failed to download and install {}", config.driver_name)
})?;
let dl_res =
runtime.block_on(async { download_with_retry(&driver_info, false, true, 1).await });
if let Err(e) = dl_res {
return Err(anyhow!("Failed to download and install geckodriver").context(e));
}
}
_ => return Err(anyhow!("Unsupported driver type: {}", config.driver_name)),
}
Expand Down