Skip to content

Commit

Permalink
fix(cache): fix loading libs on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Mar 20, 2023
1 parent b306eb3 commit 236f851
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/lazy/core/cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ end
---@private
function Loader.loader_lib(modname)
local start = uv.hrtime()
local is_win = uv.os_uname().sysname:lower():find("win", 1, true)
local sysname = uv.os_uname().sysname:lower() or ""
local is_win = sysname:find("win", 1, true) and not sysname:find("darwin", 1, true)
local ret = M.find(modname, { patterns = is_win and { ".dll" } or { ".so" } })[1]
---@type function?, string?
if ret then
Expand Down

0 comments on commit 236f851

Please sign in to comment.