From 210d5dc185f70aaefe6a3444d32c0a3c48bd0c0d Mon Sep 17 00:00:00 2001 From: Lakshya Kapoor Date: Wed, 24 Jul 2019 12:33:11 -0700 Subject: [PATCH] Fix a bug introduced by #146 in ChromeFinder. Re-adding a fix which I had accidentally reverted during the final force push. The fix updates the location methods in the ChromeFinder to return nil if a valid binary is not found. --- lib/webdrivers/chrome_finder.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/webdrivers/chrome_finder.rb b/lib/webdrivers/chrome_finder.rb index 544e752e..a2630d11 100644 --- a/lib/webdrivers/chrome_finder.rb +++ b/lib/webdrivers/chrome_finder.rb @@ -46,6 +46,8 @@ def win_location return option if File.exist?(option) end end + + nil end def mac_location @@ -59,6 +61,8 @@ def mac_location return option if File.exist?(option) end end + + nil end def linux_location @@ -71,6 +75,8 @@ def linux_location return option if File.exist?(option) end end + + nil end def win_version(location)