forked from Mirror/pmbootstrap
FIXME: helpers: run: handle Arch in cmd (MR 2252)
We need a better solution here. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
53a2953a4a
commit
aba3584b02
1 changed files with 9 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
from pmb.core.arch import Arch
|
||||
import pmb.helpers.run_core
|
||||
from typing import Any, Dict, List, Optional, Sequence
|
||||
from pmb.types import Env, PathString, PmbArgs
|
||||
|
@ -19,7 +20,13 @@ def user(cmd: Sequence[PathString], working_dir: Optional[Path] = None, output:
|
|||
See pmb.helpers.run_core.core() for a detailed description of all other
|
||||
arguments and the return value.
|
||||
"""
|
||||
cmd_parts = [os.fspath(x) for x in cmd]
|
||||
cmd_parts = []
|
||||
for c in cmd:
|
||||
if isinstance(c, Arch):
|
||||
c = str(c)
|
||||
else:
|
||||
c = os.fspath(c)
|
||||
cmd_parts.append(c)
|
||||
# Readable log message (without all the escaping)
|
||||
msg = "% "
|
||||
for key, value in env.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue