mirror of https://github.com/docker/compose.git
Merge pull request #8847 from ndeloof/compose_compatibility_env
COMPOSE_COMPATIBILITY can be set by .env file
This commit is contained in:
commit
4cb6ace1ce
|
@ -176,6 +176,10 @@ func (o *projectOptions) toProject(services []string, po ...cli.ProjectOptionsFn
|
||||||
return nil, compose.WrapComposeError(err)
|
return nil, compose.WrapComposeError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if o.Compatibility || project.Environment["COMPOSE_COMPATIBILITY"] == "true" {
|
||||||
|
compose.Separator = "_"
|
||||||
|
}
|
||||||
|
|
||||||
if len(services) > 0 {
|
if len(services) > 0 {
|
||||||
s, err := project.GetServices(services...)
|
s, err := project.GetServices(services...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -271,9 +275,6 @@ func RootCommand(backend api.Service) *cobra.Command {
|
||||||
opts.ProjectDir = opts.WorkDir
|
opts.ProjectDir = opts.WorkDir
|
||||||
fmt.Fprint(os.Stderr, aec.Apply("option '--workdir' is DEPRECATED at root level! Please use '--project-directory' instead.\n", aec.RedF))
|
fmt.Fprint(os.Stderr, aec.Apply("option '--workdir' is DEPRECATED at root level! Please use '--project-directory' instead.\n", aec.RedF))
|
||||||
}
|
}
|
||||||
if opts.Compatibility || os.Getenv("COMPOSE_COMPATIBILITY") == "true" {
|
|
||||||
compose.Separator = "_"
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue