Skip to content

Commit f90efa0

Browse files
committed
Merge pull request #15 from ruby/vais/windows
Fix ruby executable path resolution on Windows
2 parents 8c04853 + 6c110e4 commit f90efa0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/mspec/helpers/ruby_exe.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ def resolve_ruby_exe
108108
exe, *rest = cmd.split(" ")
109109

110110
if File.file?(exe) and File.executable?(exe)
111-
return [File.expand_path(exe), *rest].join(" ")
111+
exe = File.expand_path(exe)
112+
exe = exe.tr('/', '\\') if PlatformGuard.windows?
113+
return [exe, *rest].join(" ")
112114
end
113115
end
114116
nil

0 commit comments

Comments
 (0)