From 5ca4b433837b31c918514ccd8cc612807badfa20 Mon Sep 17 00:00:00 2001 From: David O'Trakoun Date: Mon, 7 Oct 2019 10:25:41 -0400 Subject: [PATCH] Update Library/Homebrew/utils/shell.rb Co-Authored-By: Mike McQuaid --- Library/Homebrew/utils/shell.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/shell.rb b/Library/Homebrew/utils/shell.rb index 9bd8b35399..8066702bf5 100644 --- a/Library/Homebrew/utils/shell.rb +++ b/Library/Homebrew/utils/shell.rb @@ -39,7 +39,8 @@ module Utils # return the shell profile file based on user's preferred shell def profile - return ENV.fetch("ZDOTDIR", "~") + "/.zshrc" if preferred.eql? "zsh" + return "#{ENV["ZDOTDIR"]}/.zshrc" if preferred == "zsh" && ENV["ZDOTDIR"].present? + SHELL_PROFILE_MAP.fetch(preferred, "~/.bash_profile") end