From 01be861debf5a768c87775768e55bb76396004c4 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 19 Jul 2014 20:58:47 -0500 Subject: [PATCH] Use if-else instead of postfix unless --- Library/Contributions/cmd/brew-pull.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Library/Contributions/cmd/brew-pull.rb b/Library/Contributions/cmd/brew-pull.rb index f6f17a2113..965ff89fd7 100755 --- a/Library/Contributions/cmd/brew-pull.rb +++ b/Library/Contributions/cmd/brew-pull.rb @@ -42,8 +42,11 @@ ARGV.named.each do |arg| end if ARGV.include? '--bottle' - raise 'No pull request detected!' unless issue - url = "https://github.com/BrewTestBot/homebrew/compare/homebrew:master...pr-#{issue}" + if issue + url = "https://github.com/BrewTestBot/homebrew/compare/homebrew:master...pr-#{issue}" + else + raise "No pull request detected!" + end end # GitHub provides commits'/pull-requests' raw patches using this URL.