Merge pull request #7421 from bayandin/patch-1

bintray: fix style
This commit is contained in:
Bo Anderson 2020-04-22 23:20:30 +01:00 committed by GitHub
commit a5b1b28ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,8 @@ class Bintray
begin begin
open_api url, "--silent", "--output", "/dev/null", auth: false open_api url, "--silent", "--output", "/dev/null", auth: false
rescue ErrorDuringExecution => e rescue ErrorDuringExecution => e
stderr = e.output.select { |type,| type == :stderr } stderr = e.output
.select { |type,| type == :stderr }
.map { |_, line| line } .map { |_, line| line }
.join .join
raise if e.status.exitstatus != 22 && !stderr.include?("404 Not Found") raise if e.status.exitstatus != 22 && !stderr.include?("404 Not Found")
@ -84,7 +85,8 @@ class Bintray
begin begin
curl "--silent", "--head", "--output", "/dev/null", url curl "--silent", "--head", "--output", "/dev/null", url
rescue ErrorDuringExecution => e rescue ErrorDuringExecution => e
stderr = e.output.select { |type,| type == :stderr } stderr = e.output
.select { |type,| type == :stderr }
.map { |_, line| line } .map { |_, line| line }
.join .join
raise if e.status.exitstatus != 22 && !stderr.include?("404 Not Found") raise if e.status.exitstatus != 22 && !stderr.include?("404 Not Found")