From cb8af6d751d1c31bc379f96f5aeee9cc84cacf49 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 23 Oct 2016 17:04:03 +0200 Subject: Fix failing test caused by `repo_info`. --- Library/Homebrew/cask/lib/hbc/cli/info.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/cask/lib') diff --git a/Library/Homebrew/cask/lib/hbc/cli/info.rb b/Library/Homebrew/cask/lib/hbc/cli/info.rb index 163ec7ed8..8701166af 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/info.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/info.rb @@ -20,7 +20,7 @@ module Hbc puts "#{cask.token}: #{cask.version}" puts Formatter.url(cask.homepage) if cask.homepage installation_info(cask) - puts "From: #{Formatter.url(repo_info(cask))}" if repo_info(cask) + puts "From: #{Formatter.url(repo_info(cask))}" name_info(cask) artifact_info(cask) Installer.print_caveats(cask) @@ -53,7 +53,11 @@ module Hbc def self.repo_info(cask) user, repo, token = QualifiedToken.parse(Hbc.all_tokens.detect { |t| t.split("/").last == cask.token }) remote_tap = Tap.fetch(user, repo) - return remote_tap.remote.to_s if remote_tap.custom_remote? + + if remote_tap.custom_remote? && !remote_tap.remote.nil? + return remote_tap.remote.to_s + end + "#{remote_tap.default_remote}/blob/master/Casks/#{token}.rb" end -- cgit v1.2.3