Safe access to tap attributes
Prevent calling name tap attribute when the tap is nil Co-Authored-By: Rylan Polster <rslpolster@gmail.com>
This commit is contained in:
parent
7ca79553f0
commit
aebf4c9100
@ -169,8 +169,8 @@ module Cask
|
||||
def to_h
|
||||
{
|
||||
"token" => token,
|
||||
"full_token" => "#{tap.name}/#{token}",
|
||||
"tap" => tap.name,
|
||||
"full_token" => full_name,
|
||||
"tap" => tap&.name,
|
||||
"name" => name,
|
||||
"desc" => desc,
|
||||
"homepage" => homepage,
|
||||
|
||||
@ -1766,7 +1766,7 @@ class Formula
|
||||
hsh = {
|
||||
"name" => name,
|
||||
"full_name" => full_name,
|
||||
"tap" => tap.name,
|
||||
"tap" => tap&.name,
|
||||
"oldname" => oldname,
|
||||
"aliases" => aliases.sort,
|
||||
"versioned_formulae" => versioned_formulae.map(&:name),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user