lib.SSHClient.run_cmd(): Accept cmd: list[str]

Make SSHClient accept a list of strings for the cmd argument to align
with the other run_cmd() functions in jw-pkg.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-17 14:45:18 +01:00
commit d0776db01f
2 changed files with 40 additions and 16 deletions

View file

@ -38,9 +38,9 @@ class CmdListRepos(Cmd): # export
ssh.set_username(username)
if password is not None:
ssh.set_password(password)
cmd = f'/opt/jw-pkg/bin/git-srv-admin.sh -u {args.from_owner} -j list-personal-projects'
out = await ssh.run_cmd(cmd)
print(out)
cmd = ['/opt/jw-pkg/bin/git-srv-admin.sh', '-u', args.from_owner, '-j', 'list-personal-projects']
stdout, stderr, code = await ssh.run_cmd(cmd)
print(stdout)
return
case 'https':
cmd_input = None