]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Check in spawn() whether the command we're trying to run is available 2593/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 4 Apr 2024 18:29:15 +0000 (20:29 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 5 Apr 2024 06:45:31 +0000 (08:45 +0200)
commitf2aff5b80ac04cefd333510a1bcff9698dc6d595
tree7bb42213bef4ae91ea78187ee8dd864adacdbc1e
parent3779dcafa18faf02cacbe11c7cdba5a722e55ccc
Check in spawn() whether the command we're trying to run is available

Currently, if we try to run a command within a sandbox, we fail with
an unclear error if the program is not installed. This is because our
FileNotFoundError exception handler is never triggered as the program
we run via subprocess is almost always "sh" or "bwrap". Let's make sure
we also check for the actual program we're going to run in the sandbox
and show a clear error if it's not available.
mkosi/run.py