From 78facdfcc6b69b0801c349066b512bc4e7059f8c Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Tue, 3 Nov 2026 18:46:45 +1000 Subject: [PATCH] fix(labels): format adding new labels in service plan with + modifier --- pkg/client/deploy/deploy.go | 2 ++ pkg/client/deploy/deploy_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/client/deploy/deploy.go b/pkg/client/deploy/deploy.go index f497ab39..12b93280 100644 --- a/pkg/client/deploy/deploy.go +++ b/pkg/client/deploy/deploy.go @@ -332,6 +332,8 @@ func formatLabelsDiff(attribute string, oldLabels, newLabels map[string]string, switch { case isNewService: blockMod = " " + case len(oldLabels) == 0: + blockMod = tui.Green.Render("+") case len(newLabels) == 0: blockMod = tui.Red.Render("-") } diff --git a/pkg/client/deploy/deploy_test.go b/pkg/client/deploy/deploy_test.go index f481eb86..d8010b56 100644 --- a/pkg/client/deploy/deploy_test.go +++ b/pkg/client/deploy/deploy_test.go @@ -205,7 +205,7 @@ func TestServicePlan_Format(t *testing.T) { expected: []string{ "~ update service web", " │ image: nginx:1.25", - " │ ~ labels:", + " │ + labels:", " │ + a=1", " │", " ╰── ~ update container web/0f6df6593e1b on machine-1 (in place)",