Skip to content

Commit

Permalink
Fix a bug with class methods definitions in Capybara::WSL
Browse files Browse the repository at this point in the history
  • Loading branch information
dersnek committed Nov 24, 2023
1 parent 5af8e2f commit c54e85d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/capybara/wsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit c54e85d

Please sign in to comment.