mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-28 16:45:24 +02:00
Fix: Decode run_cmd() result
Since commit 02697af5, ExecContext.run() returns bytes for stdout and
stderr and fixes that in calling code. The thing it did not fix was
the code calling run_cmd(), which also made return bytes. This commit
catches up on that.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
fd35fa0871
commit
21e67291b5
6 changed files with 12 additions and 14 deletions
|
|
@ -4,7 +4,7 @@ import os, re, sys, subprocess, datetime, time
|
|||
from argparse import Namespace, ArgumentParser
|
||||
from functools import lru_cache
|
||||
|
||||
from ...lib.util import run_cmd, get_profile_env
|
||||
from ...lib.util import get_profile_env
|
||||
from ...lib.log import *
|
||||
from ..Cmd import Cmd
|
||||
from ..CmdProjects import CmdProjects
|
||||
|
|
@ -115,7 +115,7 @@ class CmdBuild(Cmd): # export
|
|||
env = await get_profile_env(keep=keep)
|
||||
|
||||
try:
|
||||
stdout, stderr, status = await run_cmd(
|
||||
await self.app.exec_context.run(
|
||||
make_cmd,
|
||||
wd=wd,
|
||||
throw=True,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ from argparse import Namespace, ArgumentParser
|
|||
from urllib.parse import urlparse
|
||||
|
||||
from ...lib.log import *
|
||||
from ...lib.util import run_cmd
|
||||
from ..Cmd import Cmd
|
||||
from ..CmdProjects import CmdProjects
|
||||
|
||||
|
|
@ -35,7 +34,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, status = await run_cmd(['git', '-C', jw_pkg_dir, 'remote', '-v'])
|
||||
remotes, stderr, status = (await self.app.exec_context.run(['git', '-C', jw_pkg_dir, 'remote', '-v'])).decode()
|
||||
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