diff options
| author | Adam Vandenberg | 2010-05-01 14:06:23 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-07-03 21:48:37 -0700 |
| commit | c37294e9d322d4e19fce38cb782d1f7e7a574362 (patch) | |
| tree | 5eaae00e7a938f1c1a34e5dee8993ccfec8ee64c /Library/Homebrew/formula.rb | |
| parent | ecb5ce103e8436bbafc4ea646bda8ea4446ffee4 (diff) | |
| download | brew-c37294e9d322d4e19fce38cb782d1f7e7a574362.tar.bz2 | |
Allow user to override temp folder with HOMEBREW_TEMP
Diffstat (limited to 'Library/Homebrew/formula.rb')
| -rw-r--r-- | Library/Homebrew/formula.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 7f8b5ebc5..325ec8408 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -347,7 +347,12 @@ private # I used /tmp rather than mktemp -td because that generates a directory # name with exotic characters like + in it, and these break badly written # scripts that don't escape strings before trying to regexp them :( - tmp=Pathname.new `/usr/bin/mktemp -d /tmp/homebrew-#{name}-#{version}-XXXX`.strip + + # If the user has FileVault enabled, then we can't mv symlinks from the + # /tmp volume to the other volume. So we let the user override the tmp + # prefix if they need to. + tmp_prefix = ENV['HOMEBREW_TEMP'] || '/tmp' + tmp=Pathname.new `/usr/bin/mktemp -d #{tmp_prefix}/homebrew-#{name}-#{version}-XXXX`.strip raise "Couldn't create build sandbox" if not tmp.directory? or $? != 0 begin wd=Dir.pwd |
