Define OS::Mac on Linux
Define MacOS.version, MacOS.full_version, and MacOS::Xcode.version to Version::NULL on Linux so that brew readall succeeds and Homebrew/brew can tap Homebrew/core on Linux.
This commit is contained in:
parent
2c84c04bd4
commit
73ba9b3d88
@ -21,6 +21,7 @@ module OS
|
|||||||
end
|
end
|
||||||
PATH_OPEN = "/usr/bin/open".freeze
|
PATH_OPEN = "/usr/bin/open".freeze
|
||||||
elsif OS.linux?
|
elsif OS.linux?
|
||||||
|
require "os/linux"
|
||||||
ISSUES_URL = "https://github.com/Linuxbrew/brew/wiki/troubleshooting".freeze
|
ISSUES_URL = "https://github.com/Linuxbrew/brew/wiki/troubleshooting".freeze
|
||||||
PATH_OPEN = "xdg-open".freeze
|
PATH_OPEN = "xdg-open".freeze
|
||||||
end
|
end
|
||||||
|
28
Library/Homebrew/os/linux.rb
Normal file
28
Library/Homebrew/os/linux.rb
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
module OS
|
||||||
|
# Define OS::Mac on Linux for formula API compatibility.
|
||||||
|
module Mac
|
||||||
|
module_function
|
||||||
|
|
||||||
|
::MacOS = self # rubocop:disable Naming/ConstantName
|
||||||
|
|
||||||
|
def prefer_64_bit?
|
||||||
|
Hardware::CPU.is_64_bit?
|
||||||
|
end
|
||||||
|
|
||||||
|
def version
|
||||||
|
Version::NULL
|
||||||
|
end
|
||||||
|
|
||||||
|
def full_version
|
||||||
|
Version::NULL
|
||||||
|
end
|
||||||
|
|
||||||
|
module Xcode
|
||||||
|
module_function
|
||||||
|
|
||||||
|
def version
|
||||||
|
Version::NULL
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user