mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
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:
parent
17eb03bb28
commit
060ff5159b
1 changed files with 1 additions and 1 deletions
|
|
@ -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):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue