forked from Mirror/pmbootstrap
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:
parent
46789ccee8
commit
20a0ccf36f
8 changed files with 54 additions and 48 deletions
|
@ -71,10 +71,10 @@ def root(args, cmd, suffix="native", working_dir="/", output="log",
|
|||
# cmd_sudo: ["sudo", "env", "-i", "sh", "-c", "PATH=... /sbin/chroot ..."]
|
||||
executables = executables_absolute_path()
|
||||
cmd_chroot = [executables["chroot"], chroot, "/bin/sh", "-c",
|
||||
pmb.helpers.run.flat_cmd(cmd, working_dir)]
|
||||
pmb.helpers.run_core.flat_cmd(cmd, working_dir)]
|
||||
cmd_sudo = pmb.config.sudo([
|
||||
"env", "-i", executables["sh"], "-c",
|
||||
pmb.helpers.run.flat_cmd(cmd_chroot, env=env_all)]
|
||||
pmb.helpers.run_core.flat_cmd(cmd_chroot, env=env_all)]
|
||||
)
|
||||
return pmb.helpers.run_core.core(args, msg, cmd_sudo, None, output,
|
||||
output_return, check, True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue