diff options
| author | Baptiste Fontaine | 2015-10-16 16:41:14 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-10-18 22:57:42 +0800 |
| commit | abfaa59e06487b4cd80c5861f6fab226572259cd (patch) | |
| tree | 546fd934065098c54e12275c5b2e2bade6ee35dd /Library/Homebrew/os | |
| parent | 0915f0c6681890e47f94aab523a796f7e835f9e4 (diff) | |
| download | brew-abfaa59e06487b4cd80c5861f6fab226572259cd.tar.bz2 | |
MacOS: full_version added
Closes Homebrew/homebrew#44988.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/os')
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 2fda9c085..691f92b51 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -12,7 +12,13 @@ module OS # This can be compared to numerics, strings, or symbols # using the standard Ruby Comparable methods. def version - @version ||= Version.new(MACOS_VERSION) + @version ||= Version.new(full_version.to_s[/10\.\d+/]) + end + + # This can be compared to numerics, strings, or symbols + # using the standard Ruby Comparable methods. + def full_version + @full_version ||= Version.new(`/usr/bin/sw_vers -productVersion`.chomp) end def cat |
