pmb.helpers.run_core: move flat_cmd here

Move pmb.helpers.run.flat_cmd to run_core, as it will be used by
pmb.helpers.run_core.core in the next patch.

Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230713182337.6185-2-ollieparanoid@postmarketos.org%3E
This commit is contained in:
Oliver Smith 2023-07-13 20:19:47 +02:00
parent 46789ccee8
commit 20a0ccf36f
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
8 changed files with 54 additions and 48 deletions

View file

@ -6,6 +6,7 @@ import pmb.chroot.root
import pmb.config.pmaports
import pmb.helpers.cli
import pmb.helpers.run
import pmb.helpers.run_core
import pmb.parse.version
@ -62,7 +63,7 @@ def _create_command_with_progress(command, fifo):
"""
flags = ["--no-progress", "--progress-fd", "3"]
command_full = [command[0]] + flags + command[1:]
command_flat = pmb.helpers.run.flat_cmd(command_full)
command_flat = pmb.helpers.run_core.flat_cmd(command_full)
command_flat = f"exec 3>{fifo}; {command_flat}"
return ["sh", "-c", command_flat]