From 35af766de6ee2436a4b24495fb862383d16b419d Mon Sep 17 00:00:00 2001 From: Yochem van Rosmalen Date: Thu, 24 Jul 2025 05:03:30 +0200 Subject: refactor(lua): use vim.system #34707 --- scripts/lintcommit.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/lintcommit.lua') diff --git a/scripts/lintcommit.lua b/scripts/lintcommit.lua index 7cb57de901..b8f0a09026 100644 --- a/scripts/lintcommit.lua +++ b/scripts/lintcommit.lua @@ -27,8 +27,9 @@ local function run(cmd, or_die) if _trace then p('run: ' .. vim.inspect(cmd)) end - local rv = vim.trim(vim.fn.system(cmd)) or '' - if vim.v.shell_error ~= 0 then + local res = vim.system(cmd):wait() + local rv = vim.trim(res.stdout) + if res.code ~= 0 then if or_die then p(rv) os.exit(1) -- cgit