From f63b4359d7521fadb73f6cb64ed8f033d7fdca78 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Thu, 10 Mar 2016 00:56:32 -0500 Subject: [PATCH] brew pull: enable blocking bintray publish by setting content-type Looks like the bintray publish_wait_for_secs was being ignored because the content type wasn't being set, so it defaulted to x-www-form-urlencoded instead of application/json. Changes the timeout to 0 to preserve current non-blocking behavior, which we want in case multiple formulae are being updated. Closes Homebrew/homebrew#49951. Signed-off-by: Andrew Janke --- Library/Homebrew/cmd/pull.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb index ae762ca51c..eef2d41ee2 100644 --- a/Library/Homebrew/cmd/pull.rb +++ b/Library/Homebrew/cmd/pull.rb @@ -194,7 +194,8 @@ module Homebrew version = f.pkg_version curl "-w", '\n', "--silent", "--fail", "-u#{bintray_user}:#{bintray_key}", "-X", "POST", - "-d", '{"publish_wait_for_secs": -1}', + "-H", "Content-Type: application/json", + "-d", '{"publish_wait_for_secs": 0}', "https://api.bintray.com/content/homebrew/#{repo}/#{package}/#{version}/publish" bintray_fetch_formulae << f end