Merge pull request #16064 from thecaralice/term-env

Add a few environment variables important for editors
This commit is contained in:
Mike McQuaid 2023-10-30 14:40:56 +00:00 committed by GitHub
commit 729a6d4eac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,8 @@ module Homebrew
def edit
args = edit_args.parse
ENV["COLORTERM"] = ENV.fetch("HOMEBREW_COLORTERM", nil)
unless (HOMEBREW_REPOSITORY/".git").directory?
odie <<~EOS
Changes will be lost!

View File

@ -152,6 +152,7 @@ done
# We don't want to take the user's value for, e.g., `HOMEBREW_PATH` here!
USED_BY_HOMEBREW_VARS=(
CODESPACES
COLORTERM
DBUS_SESSION_BUS_ADDRESS
PATH
SSH_TTY