include services declared by `links` as implicit dependencies

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2022-04-08 10:32:36 +02:00
parent db698562a9
commit e766352d81
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E
1 changed files with 4 additions and 0 deletions

View File

@ -173,6 +173,10 @@ func prepareServicesDependsOn(p *types.Project) error {
dependencies = append(dependencies, spec[0])
}
for _, link := range service.Links {
dependencies = append(dependencies, strings.Split(link, ":")[0])
}
if len(dependencies) == 0 {
continue
}