Don't run certain functions on non-MACOS.
This commit is contained in:
parent
9837bbda55
commit
98352b3b41
@ -201,6 +201,7 @@ module HomebrewEnvExtension
|
|||||||
end
|
end
|
||||||
|
|
||||||
def macosxsdk v=MacOS.version
|
def macosxsdk v=MacOS.version
|
||||||
|
return unless MACOS
|
||||||
# Sets all needed lib and include dirs to CFLAGS, CPPFLAGS, LDFLAGS.
|
# Sets all needed lib and include dirs to CFLAGS, CPPFLAGS, LDFLAGS.
|
||||||
remove_macosxsdk
|
remove_macosxsdk
|
||||||
# Allow cool style of ENV.macosxsdk 10.8 here (no "" :)
|
# Allow cool style of ENV.macosxsdk 10.8 here (no "" :)
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
class Keg
|
class Keg
|
||||||
def fix_install_names
|
def fix_install_names
|
||||||
|
return unless MACOS
|
||||||
mach_o_files.each do |file|
|
mach_o_files.each do |file|
|
||||||
bad_install_names_for file do |id, bad_names|
|
bad_install_names_for file do |id, bad_names|
|
||||||
file.ensure_writable do
|
file.ensure_writable do
|
||||||
|
|||||||
@ -227,6 +227,7 @@ module MacOS extend self
|
|||||||
end
|
end
|
||||||
|
|
||||||
def mdfind id
|
def mdfind id
|
||||||
|
return [] unless MACOS
|
||||||
(@mdfind ||= {}).fetch(id.to_s) do
|
(@mdfind ||= {}).fetch(id.to_s) do
|
||||||
@mdfind[id.to_s] = `/usr/bin/mdfind "kMDItemCFBundleIdentifier == '#{id}'"`.split("\n")
|
@mdfind[id.to_s] = `/usr/bin/mdfind "kMDItemCFBundleIdentifier == '#{id}'"`.split("\n")
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user