mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 21:39:10 +00:00
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 <elezar@nvidia.com>
This commit is contained in:
parent
80ecd024ee
commit
e609e41a64
@ -117,9 +117,5 @@ func (p symlink) Locate(pattern string) ([]string, error) {
|
|||||||
seen[target] = true
|
seen[target] = true
|
||||||
targets = append(targets, target)
|
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
|
return targets, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user