mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-08 12:16:10 +00:00
fix(file): show files added since the diffed revision as empty instead of erroring (#130)
Co-authored-by: Roman Konoval <roman@jiko.io>
This commit is contained in:
co-authored by
Roman Konoval
parent
cffc74128a
commit
ca6d751de6
@@ -42,14 +42,15 @@ end
|
||||
--- @param silent boolean|nil Optional to silent the notification
|
||||
--- @return string|nil output Raw stdout bytes, or nil if failed
|
||||
--- @return boolean success Whether the command succeeded
|
||||
--- @return string stderr The command's stderr (empty on success)
|
||||
function M.execute_command_raw(cmd, error_prefix, silent)
|
||||
local result = vim.system({ "sh", "-c", cmd }):wait()
|
||||
if result.code ~= 0 then
|
||||
local msg = result.stderr ~= "" and result.stderr or result.stdout or ""
|
||||
error_notify(msg, error_prefix, silent)
|
||||
return nil, false
|
||||
return nil, false, msg
|
||||
end
|
||||
return result.stdout or "", true
|
||||
return result.stdout or "", true, ""
|
||||
end
|
||||
|
||||
--- Execute a system command synchronously and call success callback.
|
||||
|
||||
Reference in New Issue
Block a user