interactive_shell: create .zshrc when necessary

Closes Homebrew/homebrew#42190.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-07-28 14:50:58 +08:00
parent 274f21388e
commit 70025458f3

View File

@ -88,6 +88,10 @@ def interactive_shell f=nil
ENV['HOMEBREW_DEBUG_INSTALL'] = f.full_name
end
if ENV["SHELL"].include?("zsh") && ENV["HOME"].start_with?(HOMEBREW_TEMP.resolved_path.to_s)
FileUtils.touch "#{ENV["HOME"]}/.zshrc"
end
Process.wait fork { exec ENV['SHELL'] }
if $?.success?