mirror of https://github.com/docker/compose.git
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
|
@ -142,6 +142,10 @@ func (o *projectOptions) projectOrName() (*types.Project, string, error) {
|
||||||
if o.ProjectName == "" {
|
if o.ProjectName == "" {
|
||||||
p, err := o.toProject(nil)
|
p, err := o.toProject(nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
envProjectName := os.Getenv("COMPOSE_PROJECT_NAME")
|
||||||
|
if envProjectName != "" {
|
||||||
|
return nil, envProjectName, nil
|
||||||
|
}
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
project = p
|
project = p
|
||||||
|
|
Loading…
Reference in New Issue