From 7872c5154d2743c5cd58f4974d362dccb42c5569 Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Sun, 10 Sep 2023 17:01:57 +0300 Subject: [PATCH] set status to 0 if succeeded --- platform.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform.lua b/platform.lua index 291d286..f171e61 100644 --- a/platform.lua +++ b/platform.lua @@ -60,8 +60,11 @@ this.clipboard = (function() local handle = io.popen(self.clip_cmd, 'w') if handle then handle:write(text) - local suc, exit, code = handle:close() - return { status = code } + local success, status, signal = handle:close() + if success then + status = 0 + end + return { status = status } else return { status = 1 } end