Merge pull request #11379 from carlocab/tmux-env-filtering
Fix `TMUX` env variable filtering
This commit is contained in:
commit
496c24aae2
@ -48,7 +48,7 @@ class Caveats
|
||||
|
||||
# pbpaste is the system clipboard tool on macOS and fails with `tmux` by default
|
||||
# check if this is being run under `tmux` to avoid failing
|
||||
if ENV["TMUX"] && !quiet_system("/usr/bin/pbpaste")
|
||||
if ENV["HOMEBREW_TMUX"] && !quiet_system("/usr/bin/pbpaste")
|
||||
s << "" << "WARNING: brew services will fail when run under tmux."
|
||||
end
|
||||
"#{s.join("\n")}\n" unless s.empty?
|
||||
|
||||
@ -135,7 +135,7 @@ describe Caveats do
|
||||
"plist_test.plist"
|
||||
end
|
||||
end
|
||||
ENV["TMUX"] = "1"
|
||||
ENV["HOMEBREW_TMUX"] = "1"
|
||||
allow(Homebrew).to receive(:_system).with("/usr/bin/pbpaste").and_return(false)
|
||||
caveats = described_class.new(f).caveats
|
||||
|
||||
|
||||
2
bin/brew
2
bin/brew
@ -64,7 +64,7 @@ HOMEBREW_LIBRARY="${HOMEBREW_REPOSITORY}/Library"
|
||||
|
||||
# Copy and export all HOMEBREW_* variables previously mentioned in
|
||||
# manpage or used elsewhere by Homebrew.
|
||||
for VAR in BROWSER DISPLAY EDITOR NO_COLOR PATH
|
||||
for VAR in BROWSER DISPLAY EDITOR NO_COLOR PATH TMUX
|
||||
do
|
||||
# Skip if variable value is empty.
|
||||
[[ -z "${!VAR}" ]] && continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user