aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-12-11 09:44:43 +0000
committerGitHub2017-12-11 09:44:43 +0000
commit236e884511495f466c766b2913cde66099a26e1c (patch)
tree9ff8e397dd230f50e060df9b54c33d58e9ff16db
parent9356c9bc84442c4aaf9df2a20fb6702e85990a2b (diff)
parent1babfb679d1ff94acc778a0588418ae2ae6f3f74 (diff)
downloadbrew-236e884511495f466c766b2913cde66099a26e1c.tar.bz2
Merge pull request #3553 from MikeMcQuaid/bump-formula-pr-messages
bump-formula-pr: improve error messages.
-rw-r--r--Library/Homebrew/dev-cmd/bump-formula-pr.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb
index 7ad721461..5d45a33c8 100644
--- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb
+++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -180,9 +180,9 @@ module Homebrew
elsif new_tag && new_revision
false
elsif !hash_type
- odie "#{formula}: no tag/revision specified!"
+ odie "#{formula}: no --tag=/--revision= arguments specified!"
elsif !new_url
- odie "#{formula}: no url specified!"
+ odie "#{formula}: no --url= argument specified!"
else
rsrc_url = if requested_spec != :devel && new_url =~ /.*ftpmirror.gnu.*/
new_mirror = new_url.sub "ftpmirror.gnu.org", "ftp.gnu.org/gnu"
@@ -194,7 +194,7 @@ module Homebrew
rsrc.download_strategy = CurlDownloadStrategy
rsrc.owner = Resource.new(formula.name)
rsrc.version = forced_version if forced_version
- odie "No version specified!" unless rsrc.version
+ odie "No --version= argument specified!" unless rsrc.version
rsrc_path = rsrc.fetch
gnu_tar_gtar_path = HOMEBREW_PREFIX/"opt/gnu-tar/bin/gtar"
gnu_tar_gtar = gnu_tar_gtar_path if gnu_tar_gtar_path.executable?
@@ -202,7 +202,7 @@ module Homebrew
if Utils.popen_read(tar, "-tf", rsrc_path) =~ %r{/.*\.}
new_hash = rsrc_path.sha256
elsif new_url.include? ".tar"
- odie "#{formula}: no url/#{hash_type} specified!"
+ odie "#{formula}: no --url=/--#{hash_type}= arguments specified!"
end
end
@@ -338,7 +338,13 @@ module Homebrew
if reply.to_s.include? "username:"
formula.path.atomic_write(backup_file) unless ARGV.dry_run?
- odie "Please authentify with hub (eg. by typing 'cd $(brew --repo) && hub issue') and try again."
+ git_path = "$(brew --repo #{formula.tap})" if formula.tap
+ git_path ||= formula.path.parent
+ odie <<~EOS
+ Retry after configuring hub by running:
+ hub -C "#{git_path}" fork
+ Or setting HOMEBREW_GITHUB_TOKEN with at least 'public_repo' scope.
+ EOS
end
remote = reply[/remote:? (\S+)/, 1]