aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2010-08-20 10:01:49 -0700
committerAdam Vandenberg2010-08-20 10:03:44 -0700
commitf1c356a5c8958a7c07fcbfc9a5ec742e1f02a3a6 (patch)
treee107b710a699954021f03049c25c606fdf209272 /Library/Homebrew/utils.rb
parentcaca2514d2d508294e8de20beb459ab460e5cabb (diff)
downloadhomebrew-f1c356a5c8958a7c07fcbfc9a5ec742e1f02a3a6.tar.bz2
Let 'interactive_shell' take a formula and set ENV vars.
Pull duplicate code out of install --debug and install -i up into 'interactive_shell'.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 52b85bd19..829cb5164 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -82,7 +82,12 @@ def pretty_duration s
return "%.1f minutes" % (s/60)
end
-def interactive_shell
+def interactive_shell f=nil
+ unless f.nil?
+ ENV['HOMEBREW_DEBUG_PREFIX'] = f.prefix
+ ENV['HOMEBREW_DEBUG_INSTALL'] = f.name
+ end
+
fork {exec ENV['SHELL'] }
Process.wait
unless $?.success?