From b3ab95750e96698db3dd31ee8e1797aac9aa0ff7 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 22 Apr 2025 09:23:28 +0200 Subject: [PATCH] fix: trim final newline on release note Follow-up https://git.coopcloud.tech/toolshed/abra/pulls/544 --- cli/app/upgrade.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/app/upgrade.go b/cli/app/upgrade.go index 66c8abf9..7083a145 100644 --- a/cli/app/upgrade.go +++ b/cli/app/upgrade.go @@ -3,6 +3,7 @@ package app import ( "context" "fmt" + "strings" "coopcloud.tech/abra/cli/internal" "coopcloud.tech/abra/pkg/app" @@ -335,6 +336,11 @@ func getReleaseNotes( } if note != "" { + // NOTE(d1): trim any final newline on the end of the note itself before + // we manually handle newlines (for multiple release notes and + // ensuring space between the warning messages) + note = strings.TrimSuffix(note, "\n") + *upgradeReleaseNotes += fmt.Sprintf("%s\n", note) } }