Method: Object#resolve_ruby_exe
- Defined in:
- lib/mspec/helpers/ruby_exe.rb
#resolve_ruby_exe ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/mspec/helpers/ruby_exe.rb', line 104 def resolve_ruby_exe [:env, :engine, :name, :install_name].each do |option| next unless cmd = (option) exe, *rest = cmd.split(" ") # It has been reported that File.executable is not reliable # on Windows platforms (see commit 56bc555c). So, we check the # platform. if File.exist?(exe) and (PlatformGuard.windows? or File.executable?(exe)) return [File.(exe), *rest].join(" ") end end nil end |