test-bot: simplify Test#initialize
This commit is contained in:
parent
42a4f44c0e
commit
39eb93e0f5
@ -209,16 +209,13 @@ module Homebrew
|
|||||||
@added_formulae = []
|
@added_formulae = []
|
||||||
@modified_formula = []
|
@modified_formula = []
|
||||||
@steps = []
|
@steps = []
|
||||||
@tap = options[:tap]
|
@tap = options.fetch(:tap, CoreFormulaRepository.instance)
|
||||||
@repository = @tap.path
|
@repository = @tap.path
|
||||||
@skip_homebrew = options[:skip_homebrew]
|
@skip_homebrew = options.fetch(:skip_homebrew, false)
|
||||||
|
|
||||||
url_match = argument.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
|
if quiet_system "git", "rev-parse", "--verify", "-q", argument
|
||||||
|
|
||||||
git "rev-parse", "--verify", "-q", argument
|
|
||||||
if $?.success?
|
|
||||||
@hash = argument
|
@hash = argument
|
||||||
elsif url_match
|
elsif url_match = argument.match(HOMEBREW_PULL_OR_COMMIT_URL_REGEX)
|
||||||
@url = url_match[0]
|
@url = url_match[0]
|
||||||
elsif safe_formulary(argument)
|
elsif safe_formulary(argument)
|
||||||
@formulae = [argument]
|
@formulae = [argument]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user