Skip to content

Commit

Permalink
Don't show missing report errors multiple times
Browse files Browse the repository at this point in the history
In the diagnose report the missing download and/or install report files
could be rendered up to four times.

This was because if both files were missing, we'd still try to render
the reports individually, which would then lead to the same errors being
printed again.
  • Loading branch information
tombruijn committed Oct 25, 2021
1 parent f7c0b1e commit 422cbd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bump: "patch"
---

Render the install report errors in the diagnose CLI output fewer times. A missing download and/or install report could sometimes be displayed up to two times, in total four errors.
12 changes: 6 additions & 6 deletions lib/mix/tasks/appsignal.diagnose.ex
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ defmodule Mix.Tasks.Appsignal.Diagnose do
if download_parsing_error && install_parsing_error do
do_print_parsing_error("download", report)
do_print_parsing_error("installation", report)
end

if install_parsing_error do
do_print_download_report(report)
do_print_parsing_error("installation", report)
else
do_print_installation_report(report)
if install_parsing_error do
do_print_download_report(report)
do_print_parsing_error("installation", report)
else
do_print_installation_report(report)
end
end
end

Expand Down

0 comments on commit 422cbd1

Please sign in to comment.