Skip to content
Snippets Groups Projects
Verified Commit 141d8f9d authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

pmb.chroot.run: init chroot if it doesn't exist when running a cmd

Fixes #2465
parent a7e2592f
No related branches found
No related tags found
1 merge request!2435pmb.chroot: fix regression wrt running losetup in chroots
......@@ -105,6 +105,11 @@ def rootm(
pmb.helpers.run_core.flat_cmd([cmd_chroot], env=env_all),
]
)
# Make sure chroot exists before running a command in it
if not chroot.exists():
pmb.chroot.init(chroot)
return pmb.helpers.run_core.core(
msg, cmd_sudo, None, output, output_return, check, True, disable_timeout
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment