From 11b865806f5c669ad861e7547b062348aa6a62c0 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Wed, 21 May 2025 00:19:02 +0200 Subject: [PATCH] fix(format): only check return code, not signal --- lua/ow/utils.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/ow/utils.lua b/lua/ow/utils.lua index ff9c4ce..3f9dabd 100644 --- a/lua/ow/utils.lua +++ b/lua/ow/utils.lua @@ -280,7 +280,7 @@ function M.format(opts) end if - not opts.ignore_ret and (resp.code ~= 0 or resp.signal ~= 0) + not opts.ignore_ret and resp.code ~= 0 or (opts.output ~= "stderr" and stderr) then local msg = "" @@ -288,7 +288,7 @@ function M.format(opts) msg = ":\n" .. stderr end - M.err(("Failed to format%s"):format(msg)) + M.err(("Failed to format (%d)%s"):format(resp.code, msg)) return end