pull: die on invalid parameters.
This commit is contained in:
parent
3f9d5aad74
commit
cf204b6234
@ -50,11 +50,11 @@ module Homebrew
|
|||||||
|
|
||||||
def pull
|
def pull
|
||||||
if ARGV.empty?
|
if ARGV.empty?
|
||||||
onoe 'This command requires at least one argument containing a URL or pull request number'
|
odie 'This command requires at least one argument containing a URL or pull request number'
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV[0] == '--rebase'
|
if ARGV[0] == '--rebase'
|
||||||
onoe 'You meant `git pull --rebase`.'
|
odie 'You meant `git pull --rebase`.'
|
||||||
end
|
end
|
||||||
|
|
||||||
ARGV.named.each do |arg|
|
ARGV.named.each do |arg|
|
||||||
@ -68,10 +68,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
|
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
|
||||||
unless url_match
|
odie "Not a GitHub pull request or commit: #{arg}" unless url_match
|
||||||
ohai 'Ignoring URL:', "Not a GitHub pull request or commit: #{arg}"
|
|
||||||
next
|
|
||||||
end
|
|
||||||
|
|
||||||
url = url_match[0]
|
url = url_match[0]
|
||||||
issue = url_match[3]
|
issue = url_match[3]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user