lib/rake/funnel/support/msbuild/build_tool.rb in rake-funnel-0.20.0 vs lib/rake/funnel/support/msbuild/build_tool.rb in rake-funnel-0.20.1
- old
+ new
@@ -5,22 +5,22 @@
module Support
module MSBuild
class BuildTool
class << self
def find
- [mono_build, from_registry].compact.first
+ mono_build || from_registry.compact.first
end
private
def mono_build
return nil if Rake::Win32.windows?
begin
out, status = Open3.capture2('mono', '--version')
- return nil unless status.success?
+ raise "Could not determine mono version: #{status}" unless status.success?
rescue Errno::ENOENT
- return nil
+ raise 'mono is not installed'
end
return 'msbuild'.freeze if out[/^Mono JIT compiler version ([\d\.]+)/, 1] >= '5.0'
'xbuild'.freeze