mirror of
https://github.com/neovim/neovim
synced 2025-07-18 02:01:46 +00:00
fix(man.lua): useless executability check #33438
Problem:
executability check using `uv.fs_access`
doesn't work currently and can't work on windows
Solution:
only check for executable with `vim.fn.executable`
(cherry picked from commit b8763cb215
)
This commit is contained in:
committed by
github-actions[bot]
parent
2b14447803
commit
8aa49a8e9b
@ -9,9 +9,7 @@ local M = {}
|
|||||||
--- @return string
|
--- @return string
|
||||||
local function system(cmd, silent, env)
|
local function system(cmd, silent, env)
|
||||||
if vim.fn.executable(cmd[1]) == 0 then
|
if vim.fn.executable(cmd[1]) == 0 then
|
||||||
error(string.format('not found: "%s"', cmd[1]), 0)
|
error(string.format('executable not found: "%s"', cmd[1]), 0)
|
||||||
elseif vim.uv.fs_access(cmd[1], 'X') then
|
|
||||||
error(string.format('not executable : "%s"', cmd[1]), 0)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local r = vim.system(cmd, { env = env, timeout = 10000 }):wait()
|
local r = vim.system(cmd, { env = env, timeout = 10000 }):wait()
|
||||||
|
Reference in New Issue
Block a user