From d05969019e798550672f2dfe376b80c01dfbee3f Mon Sep 17 00:00:00 2001 From: Nishant Bangarwa Date: Sun, 19 Jul 2026 09:03:42 +0530 Subject: [PATCH] fix: push .env variables to the actual created project in DeployProject When the requested project name already exists in the org, CreateProject retries with a numeric suffix (e.g. my-project-1), but the subsequent UpdateProjectVariables call still targeted the originally requested name. The local .env then overwrote the variables of the unrelated pre-existing project, while the newly created project received no variables at all. Use the org and name from the CreateProject response instead, matching what RedeployProject already does. --- cli/pkg/local/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/pkg/local/server.go b/cli/pkg/local/server.go index 7b419b6c3da1..626b2ac9eaec 100644 --- a/cli/pkg/local/server.go +++ b/cli/pkg/local/server.go @@ -452,8 +452,8 @@ func (s *Server) DeployProject(ctx context.Context, r *connect.Request[localv1.D } if len(dotenv) > 0 { _, err = c.UpdateProjectVariables(ctx, &adminv1.UpdateProjectVariablesRequest{ - Org: r.Msg.Org, - Project: r.Msg.ProjectName, + Org: projResp.Project.OrgName, + Project: projResp.Project.Name, Variables: dotenv, }) if err != nil {