Let 'interactive_shell' take a formula and set ENV vars.
Pull duplicate code out of install --debug and install -i up into 'interactive_shell'.
This commit is contained in:
parent
7080ea0de6
commit
c1e293f5a4
@ -203,8 +203,7 @@ class Formula
|
||||
puts "If nothing is installed or the shell exits with a non-zero error code,"
|
||||
puts "Homebrew will abort. The installation prefix is:"
|
||||
puts prefix
|
||||
ENV['HOMEBREW_DEBUG_INSTALL'] = name
|
||||
interactive_shell
|
||||
interactive_shell self
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -85,9 +85,7 @@ def install f
|
||||
puts "to copy the diff to the clipboard."
|
||||
end
|
||||
|
||||
ENV['HOMEBREW_DEBUG_PREFIX'] = f.prefix
|
||||
ENV['HOMEBREW_DEBUG_INSTALL'] = f.name
|
||||
interactive_shell
|
||||
interactive_shell f
|
||||
nil
|
||||
elsif ARGV.include? '--help'
|
||||
system './configure --help'
|
||||
|
||||
@ -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?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user