Allow requirements to specify a default formula.
This allows default resolution of requirements without user intervention. Closes Homebrew/homebrew#19627.
This commit is contained in:
parent
8402ea29b8
commit
8c3b4fa77f
5 changed files with 5 additions and 0 deletions
|
@ -2,6 +2,7 @@ require 'formula'
|
|||
|
||||
class ErlangInstalled < Requirement
|
||||
fatal true
|
||||
default_formula 'erlang'
|
||||
|
||||
satisfy { which 'erl' }
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ require 'formula'
|
|||
class Emacs23Installed < Requirement
|
||||
fatal true
|
||||
env :userpaths
|
||||
default_formula 'emacs'
|
||||
|
||||
satisfy do
|
||||
`emacs --version 2>/dev/null` =~ /^GNU Emacs (\d{2})/
|
||||
|
|
|
@ -2,6 +2,7 @@ require 'formula'
|
|||
|
||||
class MySqlInstalled < Requirement
|
||||
fatal true
|
||||
default_formula 'mysql'
|
||||
|
||||
satisfy { which 'mysql_config' }
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ end
|
|||
|
||||
class MarkdownProvider < Requirement
|
||||
fatal true
|
||||
default_formula 'markdown'
|
||||
|
||||
satisfy { which 'markdown' }
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ require 'formula'
|
|||
|
||||
class GnupgInstalled < Requirement
|
||||
fatal true
|
||||
default_formula 'gnupg2'
|
||||
|
||||
satisfy { which('gpg') || which('gpg2') }
|
||||
|
||||
|
|
Loading…
Reference in a new issue