mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
bumpo compose-go to v2.1.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
4
vendor/github.com/compose-spec/compose-go/v2/graph/cycle.go
generated
vendored
4
vendor/github.com/compose-spec/compose-go/v2/graph/cycle.go
generated
vendored
@ -50,8 +50,8 @@ func (g *graph[T]) checkCycle() error {
|
||||
func searchCycle[T any](path []string, v *vertex[T]) error {
|
||||
names := utils.MapKeys(v.children)
|
||||
for _, name := range names {
|
||||
if i := slices.Index(path, name); i > 0 {
|
||||
return fmt.Errorf("dependency cycle detected: %s", strings.Join(path[i:], " -> "))
|
||||
if i := slices.Index(path, name); i >= 0 {
|
||||
return fmt.Errorf("dependency cycle detected: %s -> %s", strings.Join(path[i:], " -> "), name)
|
||||
}
|
||||
ch := v.children[name]
|
||||
err := searchCycle(append(path, name), ch)
|
||||
|
Reference in New Issue
Block a user