fix: reduce the number of erroneous matches in nix-index (github #45)

This commit is contained in:
Fernando Rodrigues 2025-04-07 19:56:31 +00:00 committed by GitHub
parent e1b818530c
commit 561baacb9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -125,7 +125,7 @@ pub fn get_packages(
);
return None;
}
let result = command_output(shell, &format!("nix-locate 'bin/{}'", executable));
let result = command_output(shell, &format!("nix-locate --regex 'bin/{}$'", executable));
if result.is_empty() {
return None;
}