bump compose-go to v2.2.0

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours
2024-09-12 18:14:18 +02:00
parent 3f81293fd4
commit 4da753da79
16 changed files with 197 additions and 31 deletions

View File

@ -163,8 +163,15 @@ func getExtendsBaseFromFile(
if err != nil {
return nil, nil, err
}
services := source["services"].(map[string]any)
_, ok := services[ref]
m, ok := source["services"]
if !ok {
return nil, nil, fmt.Errorf("cannot extend service %q in %s: no services section", name, local)
}
services, ok := m.(map[string]any)
if !ok {
return nil, nil, fmt.Errorf("cannot extend service %q in %s: services must be a mapping", name, local)
}
_, ok = services[ref]
if !ok {
return nil, nil, fmt.Errorf(
"cannot extend service %q in %s: service %q not found in %s",