From a3601a7ecabfda2c1d6988478c995b5ef55b4531 Mon Sep 17 00:00:00 2001 From: Dean Tate Date: Sun, 18 Feb 2024 11:12:01 +1100 Subject: [PATCH] bug: fixed the result.Operation variable prior to patchRepoVariable being called in the setVariable function. --- pkg/cmd/variable/set/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/variable/set/http.go b/pkg/cmd/variable/set/http.go index 9da732e2a17..e3acb5e0a7f 100644 --- a/pkg/cmd/variable/set/http.go +++ b/pkg/cmd/variable/set/http.go @@ -72,7 +72,7 @@ func setVariable(client *api.Client, host string, opts setOptions) setResult { return result } else if errors.As(err, &postErr) && postErr.StatusCode == 409 { // Server will return a 409 if variable already exists - result.Operation = createdOperation + result.Operation = updatedOperation err = patchRepoVariable(client, opts.Repository, opts.Key, opts.Value) } }