🐛 Fix Linux clipboard error handling
This commit is contained in:
parent
1b816e916e
commit
6c571a8296
|
@ -56,8 +56,8 @@ this.clipboard = (function()
|
||||||
local handle = io.popen(h.is_wayland() and "wl-copy" or "xclip -i -selection clipboard", 'w')
|
local handle = io.popen(h.is_wayland() and "wl-copy" or "xclip -i -selection clipboard", 'w')
|
||||||
if handle then
|
if handle then
|
||||||
handle:write(text)
|
handle:write(text)
|
||||||
handle:close()
|
local suc, exit, code = handle:close()
|
||||||
return { status = 0 }
|
return { status = code }
|
||||||
else
|
else
|
||||||
return { status = 1 }
|
return { status = 1 }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue