fix: anchor cyclic detection (#30)

Closes #25

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/30
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
This commit is contained in:
Christopher Homberger
2026-02-02 20:43:49 +00:00
committed by ChristopherHX
parent 13e0654fd7
commit 6c827eba95
3 changed files with 98 additions and 26 deletions

View File

@@ -21,7 +21,7 @@ func resolveAliasesExt(node *yaml.Node, path map[*yaml.Node]bool, skipCheck bool
if err := resolveAliasesExt(node, path, true); err != nil {
return err
}
delete(path, aliasTarget)
delete(path, node)
case yaml.DocumentNode, yaml.MappingNode, yaml.SequenceNode:
for _, child := range node.Content {