bump-formula-pr: check for URL presence.

If it's not there, produce a nicer error.

Fixes #1805.
This commit is contained in:
Mike McQuaid 2017-01-09 12:16:55 +00:00
parent f7bccee214
commit c276a44eba

View File

@ -124,6 +124,8 @@ module Homebrew
false false
elsif !hash_type elsif !hash_type
odie "#{formula}: no tag/revision specified!" odie "#{formula}: no tag/revision specified!"
elsif !new_url
odie "#{formula}: no url specified!"
else else
rsrc_url = if requested_spec != :devel && new_url =~ /.*ftpmirror.gnu.*/ rsrc_url = if requested_spec != :devel && new_url =~ /.*ftpmirror.gnu.*/
new_mirror = new_url.sub "ftpmirror.gnu.org", "ftp.gnu.org/gnu" new_mirror = new_url.sub "ftpmirror.gnu.org", "ftp.gnu.org/gnu"