Fix --safari flag being blocked by Chrome diagnostics

When --safari was passed, Chrome diagnostics were still running because
--chrome-headless defaults to true. This caused the CLI to hang while
running diagnostics for a browser that wouldn't be used.

Now skip Chrome diagnostics when --safari is explicitly set.
This commit is contained in:
Dhanji R. Prasanna
2026-01-17 09:20:21 +05:30
parent e3967a9948
commit eb6268641f

View File

@@ -112,7 +112,8 @@ pub fn load_config_with_cli_overrides(cli: &Cli) -> Result<Config> {
}
// Apply chrome-headless flag override
if cli.chrome_headless {
// Only apply chrome-headless if safari is not explicitly set
if cli.chrome_headless && !cli.safari {
config.webdriver.enabled = true;
config.webdriver.browser = g3_config::WebDriverBrowser::ChromeHeadless;