mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix tests on generic OS.
This commit is contained in:
parent
486c3765ce
commit
a97e63efbf
@ -18,7 +18,12 @@ module Homebrew
|
|||||||
bottle = formula.bottle
|
bottle = formula.bottle
|
||||||
|
|
||||||
return true if force_bottle && bottle.present?
|
return true if force_bottle && bottle.present?
|
||||||
return true if os.present?
|
if os.present?
|
||||||
|
return true
|
||||||
|
elsif ENV["HOMEBREW_TEST_GENERIC_OS"].present?
|
||||||
|
# `:generic` bottles don't exist, and `--os` flag is not specified.
|
||||||
|
return false
|
||||||
|
end
|
||||||
return true if arch.present?
|
return true if arch.present?
|
||||||
return true if bottle_tag.present? && formula.bottled?(bottle_tag)
|
return true if bottle_tag.present? && formula.bottled?(bottle_tag)
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ module Homebrew
|
|||||||
old_arch = self.arch
|
old_arch = self.arch
|
||||||
|
|
||||||
begin
|
begin
|
||||||
self.os = os if os
|
self.os = os if os && os != current_os
|
||||||
self.arch = arch if arch
|
self.arch = arch if arch && arch != current_arch
|
||||||
|
|
||||||
yield
|
yield
|
||||||
ensure
|
ensure
|
||||||
|
Loading…
x
Reference in New Issue
Block a user