From eee0e8bed9dee6e2cf7ee29ebffd272fe8b4d1b1 Mon Sep 17 00:00:00 2001 From: Ulysses Souza Date: Thu, 31 Mar 2022 14:26:16 +0200 Subject: [PATCH] Takes COMPOSE_PROJECT_NAME into consideration on commands Signed-off-by: Ulysses Souza --- cmd/compose/compose.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/compose/compose.go b/cmd/compose/compose.go index 1e9bd088e..7ed59cad8 100644 --- a/cmd/compose/compose.go +++ b/cmd/compose/compose.go @@ -143,6 +143,11 @@ func (o *projectOptions) toProjectName() (string, error) { return o.ProjectName, nil } + envProjectName := os.Getenv("COMPOSE_PROJECT_NAME") + if envProjectName != "" { + return envProjectName, nil + } + project, err := o.toProject(nil) if err != nil { return "", err