Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit b8adfbb

Browse files
committed
[build] Fix XM version check
1 parent 1d9c8ec commit b8adfbb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

dependency_checker.rb

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
NOT_INSTALLED_VERSION="-1"
44

55
XAMARIN_MAC_MIN_VERSION="2.3"
6-
XAMARIN_MAC_VERSION=lambda { product_version ("/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/bin/mmp") }
6+
XAMARIN_MAC_VERSION=lambda { product_version ("/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version") }
77
XAMARIN_MAC_URL="http://www.xamarin.com"
88

99
MONO_MIN_VERSION="4.2"
@@ -33,10 +33,9 @@ def mono_version(binary)
3333
end
3434
end
3535

36-
def product_version(binary)
37-
if File.exist?("#{binary}")
38-
version = `#{binary} --version`
39-
return version.split(' ')[1]
36+
def product_version(version_file)
37+
if File.exist?(version_file)
38+
return File.open(version_file, 'rb') { |f| f.read }
4039
else
4140
return NOT_INSTALLED_VERSION
4241
end

0 commit comments

Comments
 (0)