From 916c813c63323540350e718f2495829db905a7cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Galv=C3=A3o?= Date: Sat, 22 Feb 2020 13:44:37 +0000 Subject: [PATCH] cask-pr-manual-check: use uri.read in json.parse --- developer/bin/cask-pr-manual-check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/bin/cask-pr-manual-check b/developer/bin/cask-pr-manual-check index 46315e590b..7a71b07b21 100755 --- a/developer/bin/cask-pr-manual-check +++ b/developer/bin/cask-pr-manual-check @@ -10,7 +10,7 @@ abort 'You need to give the script exactly one argument, the URL to a pull reque abort 'URL is not from an official Homebrew Cask tap' if pr_url !~ %r{^https://github.com/Homebrew/homebrew-cask.*} pr_api = pr_url.sub(%r{^https://github.com/([^/]+)/([^/]+)/pull/([^/]+).*}, 'https://api.github.com/repos/\1/\2/pulls/\3/files') -pr_json = JSON.parse(open(pr_api).read) +pr_json = JSON.parse(URI(pr_api).read) abort 'PR needs to have a single file' if pr_json.count != 1