Skip to content

Commit 80fcef3

Browse files
committed
adjustments pointed out by ruki
1 parent b4389c8 commit 80fcef3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

xmake/modules/package/manager/nix/find_package.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ function _get_shell_build_inputs()
8585
return all_paths
8686
end
8787

88-
8988
-- Environment variables to check for nix store paths
9089
local env_vars = {
9190
"PATH",
@@ -196,7 +195,7 @@ function _validate_package_in_store_path(store_path, name)
196195

197196
-- Look for exact match, or package name in the store path
198197
local name_match = store_name:find(search_name, 1, true) or
199-
store_name:find(search_name:gsub("%-", "%%-")) -- handle hyphens
198+
store_name:find((search_name:gsub("%-", "%%-"))) -- handle hyphens
200199

201200
if name_match then
202201
return true
@@ -268,7 +267,7 @@ function _find_in_store_path(store_path, name)
268267
filename:match("^lib(.+)%.dylib")
269268

270269
if linkname then
271-
if linkname == name or linkname:find(name) then
270+
if linkname == name or linkname:find(name, 1, true) then
272271
table.insert(result.links, linkname)
273272
table.insert(result.libfiles, libfile)
274273
end

0 commit comments

Comments
 (0)