Skip to content

Commit

Permalink
Merge pull request #2871 from thc202/webdrivermacos/fix-arch
Browse files Browse the repository at this point in the history
webdrivermacos: bundle correct geckodriver
  • Loading branch information
thc202 committed Apr 23, 2021
2 parents f50d2fa + 95a6d53 commit 92efa89
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addOns/webdrivers/webdrivermacos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ All notable changes to this add-on will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased

## [28] - 2021-04-23
### Fixed
- Bundle geckodriver with the correct architecture (Issue 6543).

## [27] - 2021-04-15
### Changed
Expand Down Expand Up @@ -131,6 +132,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- First release: Firefox v0.13.0 Chrome v2.27

[28]: https://github.com/zaproxy/zap-extensions/releases/webdrivermacos-v28
[27]: https://github.com/zaproxy/zap-extensions/releases/webdrivermacos-v27
[26]: https://github.com/zaproxy/zap-extensions/releases/webdrivermacos-v26
[25]: https://github.com/zaproxy/zap-extensions/releases/webdrivermacos-v25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import javax.inject.Inject;
Expand Down Expand Up @@ -159,6 +161,13 @@ private static class FirefoxDriverManagerCustom extends FirefoxDriverManager {
instanceMap.put(DriverManagerType.FIREFOX, this);
}

@Override
protected List<URL> getDrivers() throws IOException {
List<URL> urls = super.getDrivers();
urls.removeIf(url -> url.toString().contains("aarch64"));
return urls;
}

@Override
protected Optional<String> getDriverFromCache(
String driverVersion, Architecture arch, String os) {
Expand Down

0 comments on commit 92efa89

Please sign in to comment.