mirror of
https://github.com/neovim/neovim.git
synced 2026-04-19 22:10:45 +00:00
fix(Man): completion on Mac
Problem: `man -w` does not work on recent versions of MacOs. Solution: Make it so an empty result is interpreted as an error unless silent=true
This commit is contained in:
committed by
Lewis Russell
parent
b5c0290803
commit
47f2769b46
@@ -21,9 +21,12 @@ end
|
||||
local function system(cmd, silent, env)
|
||||
local r = vim.system(cmd, { env = env, timeout = 10000 }):wait()
|
||||
|
||||
if r.code ~= 0 and not silent then
|
||||
local cmd_str = table.concat(cmd, ' ')
|
||||
man_error(string.format("command error '%s': %s", cmd_str, r.stderr))
|
||||
if not silent then
|
||||
if r.code ~= 0 then
|
||||
local cmd_str = table.concat(cmd, ' ')
|
||||
man_error(string.format("command error '%s': %s", cmd_str, r.stderr))
|
||||
end
|
||||
assert(r.stdout ~= '')
|
||||
end
|
||||
|
||||
return assert(r.stdout)
|
||||
|
||||
Reference in New Issue
Block a user