diff --git a/lib/capybara/wsl.rb b/lib/capybara/wsl.rb index a27b8e5..6192013 100644 --- a/lib/capybara/wsl.rb +++ b/lib/capybara/wsl.rb @@ -33,11 +33,11 @@ def open_file(path) warn "File saved to #{wsl_path}.\nPlease install the launchy gem to open the file automatically." end - def self.modify_path(path) + def modify_path(path) path[1..-1].prepend(detect_path).gsub("/", "\\") end - def self.detect_path + def detect_path path = `wslpath -m "/"`&.strip if path.empty?