Skip to content

Commit 292916d

Browse files
authored
Error if URL in <WEBDRIVER>_REMOTE can't be parsed (#4362)
1 parent c0fd24c commit 292916d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
* Align test output closer to native `cargo test`.
2929
[#4358](https://github.com/rustwasm/wasm-bindgen/pull/4358)
3030

31+
* Error if URL in `<WEBDRIVER>_REMOTE` can't be parsed instead of just ignoring it.
32+
[#4362](https://github.com/rustwasm/wasm-bindgen/pull/4362)
33+
3134
### Fixed
3235

3336
- Fixed using [JavaScript keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#keywords) as identifiers not being handled correctly.
@@ -49,6 +52,9 @@
4952
* Use OS provided temporary directory for tests instead of Cargo's `target` directory.
5053
[#4361](https://github.com/rustwasm/wasm-bindgen/pull/4361)
5154

55+
* Error if URL in `<WEBDRIVER>_REMOTE` can't be parsed.
56+
[#4362](https://github.com/rustwasm/wasm-bindgen/pull/4362)
57+
5258
--------------------------------------------------------------------------------
5359

5460
## [0.2.99](https://github.com/rustwasm/wasm-bindgen/compare/0.2.98...0.2.99)

crates/cli/src/bin/wasm-bindgen-test-runner/headless.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,7 @@ impl Driver {
269269
for (driver, ctor) in drivers.iter() {
270270
let env = format!("{}_REMOTE", driver.to_uppercase());
271271
let url = match env::var(&env) {
272-
Ok(var) => match Url::parse(&var) {
273-
Ok(url) => url,
274-
Err(_) => continue,
275-
},
272+
Ok(var) => Url::parse(&var).context(format!("failed to parse `{env}`"))?,
276273
Err(_) => continue,
277274
};
278275
return Ok(ctor(Locate::Remote(url)));

0 commit comments

Comments
 (0)