log: use user path

Without this, one can't use a custom pager, if it's present in
non-standard PATH, like for example Homebrew on Linux prefix.
This commit is contained in:
Dawid Dziurla 2020-02-24 13:25:59 +01:00
parent 2834a75f19
commit f11ddb9aab
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -29,6 +29,10 @@ module Homebrew
def log
log_args.parse
# As this command is simplifying user run commands then let's just use a
# user path, too.
ENV["PATH"] = ENV["HOMEBREW_PATH"]
if ARGV.named.empty?
git_log HOMEBREW_REPOSITORY
else