Merge pull request #16256 from Bo98/tap-json-fix

tap: don't display file info for uninstalled taps
This commit is contained in:
Kevin 2023-11-25 14:36:57 -08:00 committed by GitHub
commit 251a098fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -734,13 +734,13 @@ class Tap
"installed" => installed?,
"official" => official?,
"formula_names" => formula_names,
"formula_files" => formula_files.map(&:to_s),
"cask_tokens" => cask_tokens,
"cask_files" => cask_files.map(&:to_s),
"command_files" => command_files.map(&:to_s),
}
if installed?
hash["formula_files"] = formula_files.map(&:to_s)
hash["cask_files"] = cask_files.map(&:to_s)
hash["command_files"] = command_files.map(&:to_s)
hash["remote"] = remote
hash["custom_remote"] = custom_remote?
hash["private"] = private?