Skip to content

Commit

Permalink
chore: check if luarocks binary is executable
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jun 11, 2024
1 parent 3c34e06 commit f726d3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rocks/config/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local function get_default_luarocks_binary(rocks_path)
local luarocks_glob =
vim.fs.joinpath(rocks_path, "lib", "luarocks", "rocks-5.1", "luarocks", "*", "bin", "luarocks")
local default_luarocks_path = vim.fn.glob(luarocks_glob)
return vim.uv.fs_stat(default_luarocks_path) and default_luarocks_path or "luarocks"
return vim.fn.executable(default_luarocks_path) == 1 and default_luarocks_path or "luarocks"
end

local default_luarocks_binary = get_default_luarocks_binary(default_rocks_path)
Expand Down

0 comments on commit f726d3a

Please sign in to comment.