Add buildpath to Formula
This commit is contained in:
parent
554d5a2670
commit
01a6daa4d4
@ -11,6 +11,10 @@ class Formula
|
|||||||
attr_reader :standard, :unstable
|
attr_reader :standard, :unstable
|
||||||
attr_reader :bottle_url, :bottle_sha1, :head
|
attr_reader :bottle_url, :bottle_sha1, :head
|
||||||
|
|
||||||
|
# The build folder, usually in /tmp.
|
||||||
|
# Will only be non-nil during the stage method.
|
||||||
|
attr_reader :buildpath
|
||||||
|
|
||||||
# Homebrew determines the name
|
# Homebrew determines the name
|
||||||
def initialize name='__UNKNOWN__', path=nil
|
def initialize name='__UNKNOWN__', path=nil
|
||||||
set_instance_variable 'homepage'
|
set_instance_variable 'homepage'
|
||||||
@ -573,7 +577,10 @@ EOF
|
|||||||
verify_download_integrity fetched if fetched.kind_of? Pathname
|
verify_download_integrity fetched if fetched.kind_of? Pathname
|
||||||
mktemp do
|
mktemp do
|
||||||
downloader.stage
|
downloader.stage
|
||||||
|
# Set path after the downloader changes the working folder.
|
||||||
|
@buildpath = Pathname.pwd
|
||||||
yield
|
yield
|
||||||
|
@buildpath = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user