From 2dce2ace2c5ffc2c5cefbfdfae5325670c188773 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 2 Aug 2020 02:47:38 +0200 Subject: [PATCH] Pass `args.verbose?` to `Bintray`. --- Library/Homebrew/bintray.rb | 5 +++-- Library/Homebrew/dev-cmd/mirror.rb | 2 +- Library/Homebrew/dev-cmd/pr-upload.rb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/bintray.rb b/Library/Homebrew/bintray.rb index d9b8512876..455419795f 100644 --- a/Library/Homebrew/bintray.rb +++ b/Library/Homebrew/bintray.rb @@ -13,8 +13,9 @@ class Bintray "#" end - def initialize(org: "homebrew") + def initialize(org: "homebrew", verbose: false) @bintray_org = org + @verbose = verbose raise UsageError, "Must set a Bintray organisation!" unless @bintray_org @@ -32,7 +33,7 @@ class Bintray end curl(*args, url, - show_output: Homebrew.args.verbose?, + show_output: @verbose, secrets: @bintray_key) end diff --git a/Library/Homebrew/dev-cmd/mirror.rb b/Library/Homebrew/dev-cmd/mirror.rb index 832707227a..3de9a3c1a2 100644 --- a/Library/Homebrew/dev-cmd/mirror.rb +++ b/Library/Homebrew/dev-cmd/mirror.rb @@ -31,7 +31,7 @@ module Homebrew bintray_org = args.bintray_org || "homebrew" bintray_repo = args.bintray_repo || "mirror" - bintray = Bintray.new(org: bintray_org) + bintray = Bintray.new(org: bintray_org, verbose: args.verbose?) args.formulae.each do |formula| mirror_url = bintray.mirror_formula(formula, repo: bintray_repo, publish_package: !args.no_publish?) diff --git a/Library/Homebrew/dev-cmd/pr-upload.rb b/Library/Homebrew/dev-cmd/pr-upload.rb index aa83627f63..40e0b9ff96 100644 --- a/Library/Homebrew/dev-cmd/pr-upload.rb +++ b/Library/Homebrew/dev-cmd/pr-upload.rb @@ -49,7 +49,7 @@ module Homebrew args = pr_upload_args.parse bintray_org = args.bintray_org || "homebrew" - bintray = Bintray.new(org: bintray_org) + bintray = Bintray.new(org: bintray_org, verbose: args.verbose?) json_files = Dir["*.json"] odie "No JSON files found in the current working directory" if json_files.empty?