Fix graphical brew edit
behaviour
- Without `DISPLAY` as an envvar in `bin/brew`, running `brew edit` with $EDITOR set to a graphical editor (eg `gedit`), it errored on Linux: ``` $ EDITOR=gedit brew edit vim Editing /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb Unable to init server: Could not connect: Connection refused (org.gnome.gedit:15470): Gtk-WARNING **: 18:17:07.537: cannot open display: Error: Failure while executing; `gedit /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb` exited with 1. ``` Fixes #6958.
This commit is contained in:
parent
4f10b38328
commit
e6ff4dda50
2
bin/brew
2
bin/brew
@ -88,7 +88,7 @@ then
|
||||
|
||||
FILTERED_ENV=()
|
||||
# Filter all but the specific variables.
|
||||
for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS LOGNAME USER CI SSH_AUTH_SOCK SUDO_ASKPASS \
|
||||
for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS DISPLAY LOGNAME USER CI SSH_AUTH_SOCK SUDO_ASKPASS \
|
||||
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
|
||||
"${!HOMEBREW_@}" "${!TRAVIS_@}"
|
||||
do
|
||||
|
Loading…
x
Reference in New Issue
Block a user