diff options
| author | Yochem van Rosmalen <git@yochem.nl> | 2025-07-24 05:03:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-23 20:03:30 -0700 |
| commit | 35af766de6ee2436a4b24495fb862383d16b419d (patch) | |
| tree | 84e8cddb7e07f97ba9e651bd98bb41fd35353114 /scripts | |
| parent | 54b8c99e51bb124d03e21a5d268d60125ef9cc01 (diff) | |
refactor(lua): use vim.system #34707
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/lintcommit.lua | 5 |
1 files changed, 3 insertions, 2 deletions
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) |
