helpers: run: stop handling Arch in PathString (MR 2463)

This was always a hack, and it looks like there (hopefully) aren't any
placs where we still need to handle this.

Possibly expecting regressions... But then we have something to write a
test for.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-11-02 17:58:32 +01:00
parent 41c8413fda
commit 500b0908f8
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
2 changed files with 3 additions and 14 deletions

View file

@ -3,7 +3,6 @@
import os
from pathlib import Path
import subprocess
from pmb.core.arch import Arch
import pmb.helpers.run_core
from collections.abc import Sequence
from typing import overload, Literal
@ -35,13 +34,8 @@ def user(
See pmb.helpers.run_core.core() for a detailed description of all other
arguments and the return value.
"""
cmd_parts = []
for c in cmd:
if isinstance(c, Arch):
c = str(c)
else:
c = os.fspath(c)
cmd_parts.append(c)
cmd_parts = [os.fspath(c) for c in cmd]
# Readable log message (without all the escaping)
msg = "% "
for key, value in env.items():