From e47d768d5137fc1bb771ade79ac5efadd0f93dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sun, 12 May 2024 02:10:09 +0200 Subject: [PATCH] command-test.lua: fix some lint warnings Fixes unused variable warnings. --- TOOLS/lua/command-test.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TOOLS/lua/command-test.lua b/TOOLS/lua/command-test.lua index 877cacdeb6..a80edbd3e1 100644 --- a/TOOLS/lua/command-test.lua +++ b/TOOLS/lua/command-test.lua @@ -35,11 +35,11 @@ mp.observe_property("vo-configured", "bool", function(_, v) timer:resume() print("Slow screenshot command...") - res, err = mp.command_native({"screenshot"}) + res = mp.command_native({"screenshot"}) print("done, res: " .. utils.to_string(res)) print("Slow screenshot async command...") - res, err = mp.command_native_async({"screenshot"}, function(res) + res = mp.command_native_async({"screenshot"}, function(res) print("done (async), res: " .. utils.to_string(res)) timer:kill() end) @@ -78,13 +78,13 @@ mp.observe_property("vo-configured", "bool", function(_, v) mp.command_native_async({name = "subprocess", args = {"wc", "-c"}, stdin_data = "hello", capture_stdout = true}, - function(res, val, err) + function(_, val) print("Should be '5': " .. val.stdout) end) -- blocking stdin by default mp.command_native_async({name = "subprocess", args = {"cat"}, capture_stdout = true}, - function(res, val, err) + function(_, val) print("Should be 0: " .. #val.stdout) end) -- stdin + detached @@ -92,7 +92,7 @@ mp.observe_property("vo-configured", "bool", function(_, v) args = {"bash", "-c", "(sleep 5s ; cat)"}, stdin_data = "this should appear after 5s.\n", detach = true}, - function(res, val, err) + function(_, val) print("5s test: " .. val.status) end)