diff options
| author | Markus Reiter | 2016-10-23 17:04:03 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-23 17:07:29 +0200 |
| commit | cb8af6d751d1c31bc379f96f5aeee9cc84cacf49 (patch) | |
| tree | 25139376a847de9c59efb21ae6e696533816129e /Library/Homebrew/cask/lib | |
| parent | 19347f3b87917368d7157fe5007d506a4db0c7db (diff) | |
| download | brew-cb8af6d751d1c31bc379f96f5aeee9cc84cacf49.tar.bz2 | |
Fix failing test caused by `repo_info`.
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/info.rb | 8 |
1 files changed, 6 insertions, 2 deletions
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 |
