[NVIM] Make update checker portable
This commit is contained in:
+8
-1
@@ -128,7 +128,14 @@ local function check_plugin_updates()
|
|||||||
local concurrency = 2
|
local concurrency = 2
|
||||||
|
|
||||||
local function git_command(args)
|
local function git_command(args)
|
||||||
local command = { 'ionice', '-c', '3', 'nice', '-n', '10', 'git' }
|
local command = {}
|
||||||
|
if vim.fn.executable('ionice') == 1 then
|
||||||
|
vim.list_extend(command, { 'ionice', '-c', '3' })
|
||||||
|
end
|
||||||
|
if vim.fn.executable('nice') == 1 then
|
||||||
|
vim.list_extend(command, { 'nice', '-n', '10' })
|
||||||
|
end
|
||||||
|
table.insert(command, 'git')
|
||||||
vim.list_extend(command, args)
|
vim.list_extend(command, args)
|
||||||
return command
|
return command
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user