From e01704e529cbd296cb01a50fe7d4e084d05bc1f8 Mon Sep 17 00:00:00 2001 From: Lakshya Kapoor Date: Sun, 17 Jan 2021 20:46:32 -0800 Subject: [PATCH] Comment out support for msedgedriver on Linux until it's out of preview. The linux driver version is in preview and not in sync with other operating systems. This means that the LATEST_RELEASE_ file is not usable for it. It has a separate _LINUX file AND the download file lives in a deferent location than the current `base_url`. This combination of differences makes it difficult to support Linux builds within the current implementation. I was able to make it sort of work, but the implementation was messy and seemed hack-ish. I think the best thing to do is to hold off on supporting Linux builds until the general release is available. It's currently in a preview release (insider) only. --- lib/webdrivers/edge_finder.rb | 11 +++++++++++ lib/webdrivers/edgedriver.rb | 10 +++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/webdrivers/edge_finder.rb b/lib/webdrivers/edge_finder.rb index f3158652..9e85a84d 100644 --- a/lib/webdrivers/edge_finder.rb +++ b/lib/webdrivers/edge_finder.rb @@ -69,6 +69,17 @@ def mac_location end def linux_location + # directories = %w[/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /snap/bin /opt/google/chrome] + # files = %w[microsoft-edge] # Based on Microsoft Edge 89.0.760.0 dev + # + # directories.each do |dir| + # files.each do |file| + # option = "#{dir}/#{file}" + # return option if File.exist?(option) + # end + # end + # + # nil raise 'Default location not yet known' end diff --git a/lib/webdrivers/edgedriver.rb b/lib/webdrivers/edgedriver.rb index 88c20427..d3ad5b5a 100644 --- a/lib/webdrivers/edgedriver.rb +++ b/lib/webdrivers/edgedriver.rb @@ -76,15 +76,15 @@ def apple_m1_compatible?(driver_version) false end - def linux_compatible?(driver_version) - System.platform == 'linux' && driver_version >= normalize_version('89.0.731.0') - end + # def linux_compatible?(driver_version) + # System.platform == 'linux' && driver_version >= normalize_version('89.0.731.0') + # end def driver_filename(driver_version) if System.platform == 'win' || System.wsl_v1? "win#{System.bitsize}" # 32 or 64-bit - elsif linux_compatible?(driver_version) - 'linux64' + # elsif linux_compatible?(driver_version) + # 'linux64' elsif System.platform == 'mac' # Determine M1 or Intel architecture apple_arch = apple_m1_compatible?(driver_version) ? 'arm' : 'mac'