Merge pull request #8561 from josh/fix-livecheck-watchlist-read

Fix reading HOMEBREW_LIVECHECK_WATCHLIST file
This commit is contained in:
Nanda H Krishna 2020-09-02 00:45:53 +05:30 committed by GitHub
commit cbc3448634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ module Homebrew
WATCHLIST_PATH = (
ENV["HOMEBREW_LIVECHECK_WATCHLIST"] ||
Pathname.new(Dir.home)/".brew_livecheck_watchlist"
"#{Dir.home}/.brew_livecheck_watchlist"
).freeze
def livecheck_args
@ -58,7 +58,7 @@ module Homebrew
args.formulae
elsif File.exist?(WATCHLIST_PATH)
begin
WATCHLIST_PATH.read.lines.map do |line|
Pathname.new(WATCHLIST_PATH).read.lines.map do |line|
next if line.start_with?("#")
Formula[line.strip]