We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Shell#profile
preferred
1 parent 22a1fb9 commit d2fd233Copy full SHA for d2fd233
Library/Homebrew/utils/shell.rb
@@ -67,7 +67,9 @@ def profile
67
return "#{ENV["HOMEBREW_ZDOTDIR"]}/.zshrc" if ENV["HOMEBREW_ZDOTDIR"].present?
68
end
69
70
- SHELL_PROFILE_MAP.fetch(preferred, "~/.profile")
+ return "~/.profile" if (shell = preferred).nil?
71
+
72
+ SHELL_PROFILE_MAP.fetch(shell, "~/.profile")
73
74
75
sig { params(variable: String, value: String).returns(T.nilable(String)) }
@@ -110,7 +112,7 @@ def prepend_path_in_profile(path)
110
112
tcsh: "~/.tcshrc",
111
113
zsh: "~/.zshrc",
114
}.freeze,
- T::Hash[T.nilable(Symbol), String],
115
+ T::Hash[Symbol, String],
116
)
117
118
UNSAFE_SHELL_CHAR = %r{([^A-Za-z0-9_\-.,:/@~+\n])}
0 commit comments