Skip to content

Commit

Permalink
Error if URL in <WEBDRIVER>_REMOTE can't be parsed (rustwasm#4362)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Dec 19, 2024
1 parent fc8fbcb commit 45b364f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/cli/src/bin/wasm-bindgen-test-runner/headless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,7 @@ impl Driver {
for (driver, ctor) in drivers.iter() {
let env = format!("{}_REMOTE", driver.to_uppercase());
let url = match env::var(&env) {
Ok(var) => match Url::parse(&var) {
Ok(url) => url,
Err(_) => continue,
},
Ok(var) => Url::parse(&var).context(format!("failed to parse `{env}`"))?,
Err(_) => continue,
};
return Ok(ctor(Locate::Remote(url)));
Expand Down

0 comments on commit 45b364f

Please sign in to comment.