Skip to content

Commit

Permalink
Don't try and get version when binary isn't found
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Jun 12, 2019
1 parent 984a43e commit 309e6a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/webdrivers/edge_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class EdgeFinder
class << self
def version
location = Selenium::WebDriver::EdgeChrome.path || send("#{System.platform}_location")
version = send("#{System.platform}_version", System.escape_path(location))
version = send("#{System.platform}_version", System.escape_path(location)) if location

raise VersionError, 'Failed to find Edge binary or its version.' if version.nil? || version.empty?

Expand All @@ -29,6 +29,7 @@ def win_location
return option
end
end
nil
end

def mac_location
Expand All @@ -43,6 +44,7 @@ def mac_location
return option if File.exist?(option)
end
end
nil
end

def linux_location
Expand Down

0 comments on commit 309e6a2

Please sign in to comment.