mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Limit number of candidates for executables
This change ensures that the first match of an executable in the path is retured instead of a list of candidates. This prevents a CDI spec, for example, from containing multiple entries for a single executable (e.g. nvidia-smi). Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -41,6 +41,7 @@ func newExecutableLocator(logger *log.Logger, root string, paths ...string) *exe
|
||||
WithRoot(root),
|
||||
WithSearchPaths(paths...),
|
||||
WithFilter(assertExecutable),
|
||||
WithCount(1),
|
||||
)
|
||||
|
||||
l := executable{
|
||||
|
||||
Reference in New Issue
Block a user