From e609e41a64791f5d1dd54cec39dc19fb4d3d058f Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 17 Nov 2023 10:35:07 +0100 Subject: [PATCH] Allow multiple pattern matches for symlinks Since we allow pattern inputs for locating symlinks we could have multiples. The error being checked is resolved by the deduplication. Signed-off-by: Evan Lezar --- internal/lookup/symlinks.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/lookup/symlinks.go b/internal/lookup/symlinks.go index 41a0cf0e..aa4c147e 100644 --- a/internal/lookup/symlinks.go +++ b/internal/lookup/symlinks.go @@ -117,9 +117,5 @@ func (p symlink) Locate(pattern string) ([]string, error) { seen[target] = true targets = append(targets, target) } - - if len(targets) != 1 { - return nil, fmt.Errorf("failed to locate patern %q: %w; failed to uniquely resolve symlink: %v", pattern, errNotFound, candidates) - } return targets, err }