From 3f17bbdc6032512dbe7235036cf2ee883350706c Mon Sep 17 00:00:00 2001 From: DirkFi Date: Tue, 3 Sep 2024 11:14:57 -0700 Subject: [PATCH] Change stdout to the correct option of tar --- yazi-plugin/preset/plugins/archive.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-plugin/preset/plugins/archive.lua b/yazi-plugin/preset/plugins/archive.lua index c1c99a29..24f541e1 100644 --- a/yazi-plugin/preset/plugins/archive.lua +++ b/yazi-plugin/preset/plugins/archive.lua @@ -54,7 +54,7 @@ function M:seek(units) end function M:spawn_tar(args) - local stdout = args[1] == "l" and Command.PIPED or Command.NULL + local stdout = args[1] and args[1]:sub(0, 2) == "-t" and Command.PIPED or Command.NULL local child, code = Command("tar"):args(args):stdout(stdout):stderr(Command.PIPED):spawn() if not child then return nil, "Failed to spawn, error code: " .. tostring(code)