aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/fileutils.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb
index 60f795700..6a6d8585a 100644
--- a/Library/Homebrew/extend/fileutils.rb
+++ b/Library/Homebrew/extend/fileutils.rb
@@ -15,11 +15,10 @@ module FileUtils extend self
# prefix if they need to.
tmp = ENV['HOMEBREW_TEMP'].chuzzle || '/tmp'
tempd = `/usr/bin/mktemp -d #{tmp}/brew-#{name}-#{version}-XXXX`.chuzzle
+ raise "Failed to create sandbox" if tempd.nil?
prevd = pwd
cd tempd
yield
- rescue StandardError
- raise "Failed to create sandbox"
ensure
cd prevd if prevd
ignore_interrupts{ rm_r tempd } if tempd