From 70025458f36c12768c603a3c9cc0f0faf32ccd98 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Tue, 28 Jul 2015 14:50:58 +0800 Subject: interactive_shell: create .zshrc when necessary Closes Homebrew/homebrew#42190. Signed-off-by: Xu Cheng --- Library/Homebrew/utils.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 9c0737ff5..1c3127f49 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -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? -- cgit v1.2.3