Merge pull request #15287 from carlocab/fix-audit-annotations

dev-cmd/audit: fix audit annotations
This commit is contained in:
Carlo Cabrera 2023-04-22 16:49:45 +08:00 committed by GitHub
commit 664ac04782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,9 +309,8 @@ module Homebrew
return unless ENV["GITHUB_ACTIONS"]
annotations = formula_results.merge(cask_results).flat_map do |path, problem|
next if problem.blank?
annotations = formula_results.merge(cask_results).flat_map do |path, problems|
problems.map do |problem|
GitHub::Actions::Annotation.new(
:error,
problem[:message],
@ -319,6 +318,7 @@ module Homebrew
line: problem[:location]&.line,
column: problem[:location]&.column,
)
end
end.compact
annotations.each do |annotation|