cmds.posix.tar.CmdExtract: Log number of extracted files

Add a little log line at execution end, saying how many files were actually extracted.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-24 16:28:37 +02:00
commit db22f11b32
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -10,6 +10,7 @@ from .Cmd import Cmd
from ..CmdTar import CmdTar
from ....lib.FileContext import FileContext
from ....lib.log import *
class CmdExtract(Cmd): # export
@ -22,4 +23,5 @@ class CmdExtract(Cmd): # export
async def _run(self, args: Namespace) -> None:
async with self.ctx(dst=args.dst) as ctx:
await ctx.extract(ctx.dst.root)
paths = await ctx.extract(ctx.dst.root)
log(DEBUG, f'Extracted {len(paths)} files')