Fix TMUX env variable filtering
We currently filter out `TMUX`, but this breaks displaying some caveats.
This also enables an alias I use (and improved by @Rylan12):
brew alias fzp='!id="$(gh pr list -L200 -R github.com/Homebrew/homebrew-core | TMUX=$HOMEBREW_TMUX fzf-tmux -p "90%,50%" --multi | cut -f1)"; [ -n "$id" ] && brew pr-publish --autosquash $id'
This commit is contained in:
parent
321c165bd3
commit
4fb06efe81
@ -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