Skip to content

Commit eee0e8b

Browse files
committed
Takes COMPOSE_PROJECT_NAME into consideration on commands
Signed-off-by: Ulysses Souza <[email protected]>
1 parent 934b596 commit eee0e8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/compose/compose.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ func (o *projectOptions) toProjectName() (string, error) {
143143
return o.ProjectName, nil
144144
}
145145

146+
envProjectName := os.Getenv("COMPOSE_PROJECT_NAME")
147+
if envProjectName != "" {
148+
return envProjectName, nil
149+
}
150+
146151
project, err := o.toProject(nil)
147152
if err != nil {
148153
return "", err

0 commit comments

Comments
 (0)