diff options
| author | Dwayne Litzenberger | 2013-10-12 15:18:33 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2013-10-13 10:40:44 +0100 |
| commit | 138c901fd25471158a151d18b1f8e262c7d95493 (patch) | |
| tree | f3a8f12fac0370ecbf4a71ec6f75e7e818ed2980 /Library/Formula | |
| parent | c1cfbe8ae78200c7f915654e0072b1c2b58642b6 (diff) | |
| download | homebrew-138c901fd25471158a151d18b1f8e262c7d95493.tar.bz2 | |
bash: use SSH_SOURCE_BASHRC (like Apple bash).
Apple's /bin/bash is built with SSH_SOURCE_BASHRC, which causes
~/.bashrc to get sourced when the shell is run non-interactively over or
sshd/rshd. Linux distros usually also build with SSH_SOURCE_BASHRC (at
least, Debian does). This makes Homebrew do the same.
Closes #23234.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/bash.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/bash.rb b/Library/Formula/bash.rb index cb35915b3..0ed6e68d2 100644 --- a/Library/Formula/bash.rb +++ b/Library/Formula/bash.rb @@ -19,6 +19,14 @@ class Bash < Formula end unless build.head? def install + # When built with SSH_SOURCE_BASHRC, bash will source ~/.bashrc when + # it's non-interactively from sshd. This allows the user to set + # environment variables prior to running the command (e.g. PATH). The + # /bin/bash that ships with Mac OS X defines this, and without it, some + # things (e.g. git+ssh) will break if the user sets their default shell to + # Homebrew's bash instead of /bin/bash. + ENV.append_to_cflags "-DSSH_SOURCE_BASHRC" + system "./configure", "--prefix=#{prefix}", "--with-installed-readline" system "make install" end |
