Skip to content
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

CoreTap.default_remote: Use Linuxbrew/core [Linux] #5024

Merged
merged 1 commit into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion Library/Homebrew/cmd/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ git() {

git_init_if_necessary() {
BREW_OFFICIAL_REMOTE="https://github.com/Homebrew/brew"
CORE_OFFICIAL_REMOTE="https://github.com/Homebrew/homebrew-core"
if [[ -n "$HOMEBREW_MACOS" ]] || [[ -n "$HOMEBREW_FORCE_HOMEBREW_ORG" ]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just used by brew test-bot, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then
CORE_OFFICIAL_REMOTE="https://github.com/Homebrew/homebrew-core"
else
CORE_OFFICIAL_REMOTE="https://github.com/Linuxbrew/homebrew-core"
fi

safe_cd "$HOMEBREW_REPOSITORY"
if [[ ! -d ".git" ]]
Expand Down
9 changes: 9 additions & 0 deletions Library/Homebrew/extend/os/linux/tap.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class CoreTap < Tap
def default_remote
if ENV["HOMEBREW_FORCE_HOMEBREW_ORG"]
"https://github.com/Homebrew/homebrew-core".freeze
else
"https://github.com/Linuxbrew/homebrew-core".freeze
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this direct people to file Linux formulae issues there (if we don't already do that)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user is directed to OS::ISSUES_URL, which on Linux is https://github.com/Linuxbrew/brew/wiki/Troubleshooting.
As far as I can tell, CoreTap.instance.issues_url is not used when official_tap? is true.

end
end
end
1 change: 1 addition & 0 deletions Library/Homebrew/extend/os/tap.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require "extend/os/linux/tap" if OS.linux?
2 changes: 2 additions & 0 deletions Library/Homebrew/tap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -735,3 +735,5 @@ def []=(key, value)
end
end
end

require "extend/os/tap"