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
|
||||
|
||||
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 bottle_tag.present? && formula.bottled?(bottle_tag)
|
||||
|
||||
|
@ -23,8 +23,8 @@ module Homebrew
|
||||
old_arch = self.arch
|
||||
|
||||
begin
|
||||
self.os = os if os
|
||||
self.arch = arch if arch
|
||||
self.os = os if os && os != current_os
|
||||
self.arch = arch if arch && arch != current_arch
|
||||
|
||||
yield
|
||||
ensure
|
||||
|
Loading…
x
Reference in New Issue
Block a user