-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reading HOMEBREW_LIVECHECK_WATCHLIST file #8561
Fix reading HOMEBREW_LIVECHECK_WATCHLIST file #8561
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks @josh, good to see you and hope you're well! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to add a suggestion in a line without changes, but we have:
WATCHLIST_PATH = (
ENV["HOMEBREW_LIVECHECK_WATCHLIST"] ||
Pathname.new(Dir.home)/".brew_livecheck_watchlist"
).freeze
Might be good to change it to:
WATCHLIST_PATH = (
ENV["HOMEBREW_LIVECHECK_WATCHLIST"] ||
"#{Dir.home}/.brew_livecheck_watchlist"
).freeze
Along with your current change, that is. What do you think @samford?
@nandahkrishna 👍🏻 that seems like good idea. That way |
Good catch, Nanda. I agree that using a uniform type for I believe at one point I made that change while working on something else in livecheck but evidently I didn't commit it. It's probably buried somewhere in the 60+ stashes that I need to work through in my old homebrew-livecheck tap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @josh!
When setting a
HOMEBREW_LIVECHECK_WATCHLIST
environment variable,livecheck
attempts to perform an IO read on a String when it probably expected a Pathname.Looks like this may have been lost in the shuffle of moving livecheck into core.
https://github.com/Homebrew/homebrew-livecheck/blob/6b4a6e342a1a39c0179a1704cf5497cbe9054d8d/cmd/livecheck.rb#L99-L101
(BTW livecheck is ✨)
CC: @MikeMcQuaid