Skip to content

Commit

Permalink
Change stdout to the correct option of tar
Browse files Browse the repository at this point in the history
  • Loading branch information
DirkFi authored and sxyazi committed Sep 14, 2024
1 parent 89f83ef commit 3f17bbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yazi-plugin/preset/plugins/archive.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3f17bbd

Please sign in to comment.