Allow forcing bottle installation.

This commit is contained in:
Mike McQuaid 2013-09-01 12:59:01 +01:00
parent dd94518a40
commit 98eac4226b
2 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@ def install_bottle? f, warn=false
and f.downloader.local_bottle_path
return false if ARGV.build_from_source?
return true if ARGV.force_bottle?
return false unless f.pour_bottle?
return false unless f.build.used_options.empty?
return false unless bottle_current?(f)

View File

@ -149,6 +149,10 @@ module HomebrewArgvExtension
end
end
def force_bottle?
include? '--force-bottle'
end
# eg. `foo -ns -i --bar` has three switches, n, s and i
def switch? switch_character
return false if switch_character.length > 1