mirror of
https://github.com/docker/compose.git
synced 2025-07-22 21:24:38 +02:00
Report error if project name is empty after normalization
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
4ea44797f5
commit
ae26426cc8
@ -189,6 +189,10 @@ func (o *ProjectOptions) ToProject(services []string, po ...cli.ProjectOptionsFn
|
||||
return nil, compose.WrapComposeError(err)
|
||||
}
|
||||
|
||||
if project.Name == "" {
|
||||
return nil, errors.New("project name can't be empty. Use `--project-name` to set a valid name")
|
||||
}
|
||||
|
||||
for i, s := range project.Services {
|
||||
s.CustomLabels = map[string]string{
|
||||
api.ProjectLabel: project.Name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user