diagnostic: also accept trailing / on git urls.

This commit is contained in:
Mike McQuaid 2017-03-28 19:44:30 +01:00
parent 46a91428f7
commit b757c927af

View File

@ -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.