diff options
| author | Adam Vandenberg | 2012-02-24 12:50:21 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-02-24 21:35:51 -0800 |
| commit | 8bf54c485cc793c4bb423dd4f5d02dcc7b67fd7a (patch) | |
| tree | b16bfe7af4d56758b68a1b603818cc0ea0791f66 /Library/Homebrew | |
| parent | 531a5765099c95f56c0455e0a4686b8952569105 (diff) | |
| download | homebrew-8bf54c485cc793c4bb423dd4f5d02dcc7b67fd7a.tar.bz2 | |
Add `buildpath` to Formula
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formula.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 30c8d953b..7335afd24 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -11,6 +11,10 @@ class Formula attr_reader :standard, :unstable 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 def initialize name='__UNKNOWN__', path=nil set_instance_variable 'homepage' @@ -573,7 +577,10 @@ EOF verify_download_integrity fetched if fetched.kind_of? Pathname mktemp do downloader.stage + # Set path after the downloader changes the working folder. + @buildpath = Pathname.pwd yield + @buildpath = nil end end |
