🐛 Fix Linux clipboard error handling

This commit is contained in:
TheColorman 2023-06-26 14:56:19 +02:00
parent 1b816e916e
commit 6c571a8296
No known key found for this signature in database
GPG key ID: A9C799E05AC900AF

View file

@ -56,8 +56,8 @@ this.clipboard = (function()
local handle = io.popen(h.is_wayland() and "wl-copy" or "xclip -i -selection clipboard", 'w')
if handle then
handle:write(text)
handle:close()
return { status = 0 }
local suc, exit, code = handle:close()
return { status = code }
else
return { status = 1 }
end