From c398d0340f3fb39e4195b4c1f8f3f4f52dcf57bf Mon Sep 17 00:00:00 2001 From: Nick Fagerlund Date: Wed, 27 Dec 2023 16:23:20 -0800 Subject: [PATCH] Catch a missing assign-after-append I believe this is a slice append under the hood, which would mean `.Append()` consumes the original receiver and you shouldn't touch it afterwards. --- internal/command/cloud.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/command/cloud.go b/internal/command/cloud.go index 47709a626f..e3aebb9b1d 100644 --- a/internal/command/cloud.go +++ b/internal/command/cloud.go @@ -205,7 +205,7 @@ func (c *CloudCommand) initPlugin() tfdiags.Diagnostics { defer done() // Discover service URLs, and build out the plugin config - diags.Append(c.discoverAndConfigure()) + diags = diags.Append(c.discoverAndConfigure()) if diags.HasErrors() { return diags }