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:
Jan Lindemann 2026-03-23 13:13:55 +01:00
commit 21e67291b5
6 changed files with 12 additions and 14 deletions

View file

@ -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,

View file

@ -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)