mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 17:45:55 +02:00
run_cmd() and friends: Make args a list[str]
This is a code maintenance commit: some run_xxx() helper functions take a string, some a list, and some just digest all arguments and pass them on as a list to exec() to be executed. That's highly inconsistent. This commit changes that to list-only. Except for the run_cmd() method of SSHClient, which is still run as a shell method, because, erm, it's a shell. Might be changed in the future for consistency reasons. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
fbeefa2d9e
commit
b81406e11a
12 changed files with 22 additions and 23 deletions
|
|
@ -116,7 +116,7 @@ class CmdBuild(Cmd): # export
|
|||
|
||||
try:
|
||||
stdout, stderr = await run_cmd(
|
||||
*make_cmd,
|
||||
make_cmd,
|
||||
wd=wd,
|
||||
throw=True,
|
||||
verbose=True,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class CmdGetAuthInfo(Cmd): # export
|
|||
if not os.path.isdir(jw_pkg_dir + '/.git'):
|
||||
log(DEBUG, f'jw-pkg directory is not a Git repo: {jw_pkg_dir}')
|
||||
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] = {}
|
||||
for line in remotes.splitlines():
|
||||
name, url, typ = re.split(r'\s+', line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue