From b757c927afe7abb5d284cf28dc7d5e3321dba14c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 28 Mar 2017 19:44:30 +0100 Subject: [PATCH] diagnostic: also accept trailing / on git urls. --- Library/Homebrew/diagnostic.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 110130f11c..61cdf2f1ac 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -808,7 +808,7 @@ module Homebrew properly. You can solve this by adding the Homebrew remote: git -C "#{HOMEBREW_REPOSITORY}" remote add origin #{Formatter.url("https://github.com/Homebrew/brew.git")} EOS - elsif origin !~ %r{Homebrew/brew(\.git)?$} + elsif origin !~ %r{Homebrew/brew(\.git|/)?$} <<-EOS.undent Suspicious Homebrew/brew git origin remote found. @@ -837,7 +837,7 @@ module Homebrew properly. You can solve this by adding the Homebrew remote: git -C "#{coretap_path}" remote add origin #{Formatter.url("https://github.com/Homebrew/homebrew-core.git")} EOS - elsif origin !~ %r{Homebrew/homebrew-core(\.git)?$} + elsif origin !~ %r{Homebrew/homebrew-core(\.git|/)?$} <<-EOS.undent Suspicious #{CoreTap.instance} git origin remote found.