Skip to content

Commit

Permalink
Comment out support for msedgedriver on Linux until it's out of preview.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kapoorlakshya committed Jan 18, 2021
1 parent 525462a commit e01704e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
11 changes: 11 additions & 0 deletions lib/webdrivers/edge_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions lib/webdrivers/edgedriver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e01704e

Please sign in to comment.