diff options
| author | Emanuel Krollmann <115734183+Sodastream11@users.noreply.github.com> | 2025-04-13 00:50:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-12 15:50:04 -0700 |
| commit | b8763cb21525b026de4a39b508de07d57cac6faa (patch) | |
| tree | 1ef747e85618dbaaead870a8104a1c997ac9e49b /runtime/lua/man.lua | |
| parent | a8dd5c7e41dde33a5e130eb6d8945def13ebb8d6 (diff) | |
| download | rneovim-b8763cb21525b026de4a39b508de07d57cac6faa.tar.gz rneovim-b8763cb21525b026de4a39b508de07d57cac6faa.tar.bz2 rneovim-b8763cb21525b026de4a39b508de07d57cac6faa.zip | |
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`
Diffstat (limited to 'runtime/lua/man.lua')
| -rw-r--r-- | runtime/lua/man.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua index c6b05d1412..61950f184e 100644 --- a/runtime/lua/man.lua +++ b/runtime/lua/man.lua @@ -9,9 +9,7 @@ local M = {} --- @return string local function system(cmd, silent, env) if vim.fn.executable(cmd[1]) == 0 then - error(string.format('not found: "%s"', cmd[1]), 0) - elseif vim.uv.fs_access(cmd[1], 'X') then - error(string.format('not executable : "%s"', cmd[1]), 0) + error(string.format('executable not found: "%s"', cmd[1]), 0) end local r = vim.system(cmd, { env = env, timeout = 10000 }):wait() |