Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure offline sets associated flags #12718

Merged
merged 1 commit into from
Sep 11, 2023
Merged
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
15 changes: 13 additions & 2 deletions rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,28 @@ fn main() {
flush_and_exit(DATAERR, &log);
};

selenium_manager.set_logger(log);
selenium_manager.set_browser_version(cli.browser_version.unwrap_or_default());
selenium_manager.set_driver_version(cli.driver_version.unwrap_or_default());
selenium_manager.set_browser_path(cli.browser_path.unwrap_or_default());
selenium_manager.set_os(cli.os.unwrap_or_default());
selenium_manager.set_arch(cli.arch.unwrap_or_default());
selenium_manager.set_ttl(cli.ttl);
selenium_manager.set_offline(cli.offline);
selenium_manager.set_force_browser_download(cli.force_browser_download);
selenium_manager.set_avoid_browser_download(cli.avoid_browser_download);
selenium_manager.set_cache_path(cache_path.clone());
selenium_manager.set_offline(cli.offline);
if cli.offline {
if cli.force_browser_download {
log.warn("Offline flag set, but also asked to force downloads. Honouring offline flag");
}
selenium_manager.set_force_browser_download(false);
if !cli.avoid_browser_download {
log.warn("Offline flag set, but also asked not to avoid browser downloads. Honouring offline flag");
}
selenium_manager.set_avoid_browser_download(true);
}
selenium_manager.set_logger(log);


if cli.clear_cache || BooleanKey("clear-cache", false).get_value() {
clear_cache(selenium_manager.get_logger(), &cache_path);
Expand Down
Loading