jw.pkg.cmds.projects.CmdGetAuthInfo: Fix run_cmd()

CmdGetAuthInfo calls run_cmd() with a list instead of a *-expanded
list of arguments. Fix this to match the current run_cmd() prototype.

And think again if the current prototype conforms to the priciple of
least surprise: Most exec- / run- / whatever- functions do expect
ether a string to be run by the shell, or an argv list.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-14 18:08:29 +00:00
commit 060ff5159b

View file

@ -29,7 +29,7 @@ class CmdGetAuthInfo(Cmd): # export
if not os.path.isdir(jw_pkg_dir + '/.git'): if not os.path.isdir(jw_pkg_dir + '/.git'):
log(DEBUG, f'jw-pkg directory is not a Git repo: {jw_pkg_dir}') log(DEBUG, f'jw-pkg directory is not a Git repo: {jw_pkg_dir}')
return return
remotes, stderr = await run_cmd(['git', '-C', jw_pkg_dir, 'remote', '-v']) remotes, stderr = await run_cmd('git', '-C', jw_pkg_dir, 'remote', '-v')
result: dict[str, str] = {} result: dict[str, str] = {}
for line in remotes.split('\n'): for line in remotes.split('\n'):
if re.match(r'^\s*$', line): if re.match(r'^\s*$', line):