From a96289bf08874a8a86a0ad85f064ec5be9cb770f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Galv=C3=A3o?= Date: Thu, 13 Dec 2018 20:59:50 +0000 Subject: [PATCH] cask_pr_manual_check: fix running without an argument (#56108) --- 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 ae4650786d..248a08af15 100755 --- a/developer/bin/cask_pr_manual_check +++ b/developer/bin/cask_pr_manual_check @@ -6,7 +6,7 @@ require 'tmpdir' pr_url = ARGV[0] -abort 'You need to give the script exactly one argument, the URL to a pull request from an official Homebrew Cask tap' if ARGV[0].empty? +abort 'You need to give the script exactly one argument, the URL to a pull request from an official Homebrew Cask tap' if pr_url.nil? 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')