mirror of
https://github.com/docker/compose.git
synced 2026-10-09 05:25:33 +00:00
Change projectOrName() to check COMPOSE_PROJECT_NAME env var
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
parent
be495ab8e6
commit
c586ca4d0e
2 changed files with 5 additions and 1 deletions
|
|
@ -142,6 +142,10 @@ func (o *projectOptions) projectOrName() (*types.Project, string, error) {
|
|||
if o.ProjectName == "" {
|
||||
p, err := o.toProject(nil)
|
||||
if err != nil {
|
||||
envProjectName := os.Getenv("COMPOSE_PROJECT_NAME")
|
||||
if envProjectName != "" {
|
||||
return nil, envProjectName, nil
|
||||
}
|
||||
return nil, "", err
|
||||
}
|
||||
project = p
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue