Save tap in constructor
This commit is contained in:
parent
d1820a8fb1
commit
912678ca5e
@ -143,6 +143,7 @@ module Homebrew
|
||||
fc = FormulaCreator.new(
|
||||
args.set_name,
|
||||
args.set_version,
|
||||
tap: args.tap,
|
||||
license: args.set_license,
|
||||
fetch: !args.no_fetch?,
|
||||
head: args.HEAD?,
|
||||
@ -152,7 +153,6 @@ module Homebrew
|
||||
print "Formula name [#{stem}]: "
|
||||
fc.name = __gets || stem
|
||||
end
|
||||
fc.tap = Tap.fetch(args.tap || "homebrew/core")
|
||||
raise TapUnavailableError, fc.tap.name unless fc.tap.installed?
|
||||
|
||||
fc.url = args.named.first
|
||||
|
||||
@ -12,9 +12,10 @@ module Homebrew
|
||||
attr_reader :url, :sha256, :desc, :homepage
|
||||
attr_accessor :name, :tap, :mode
|
||||
|
||||
def initialize(name, version, license:, fetch: true, head: false)
|
||||
def initialize(name, version, tap:, license:, fetch: true, head: false)
|
||||
@name = name
|
||||
@version = Version.new(version) if version
|
||||
@tap = Tap.fetch(tap || "homebrew/core")
|
||||
@license = license
|
||||
@fetch = fetch
|
||||
@head = head
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user