forked from Mirror/pmbootstrap
require_programs: run losetup with absolute path (MR 2475)
Use the absolute path for it, so it works in Debian too as we run it without sudo here to just check if the argument is supported.
This commit is contained in:
parent
765ba770dd
commit
54e55f26ef
1 changed files with 3 additions and 2 deletions
|
@ -48,9 +48,10 @@ def require_programs() -> None:
|
|||
losetup_missing_json = False
|
||||
|
||||
if "losetup" not in missing:
|
||||
# Check if losetup supports the --json argument.
|
||||
# Check if losetup supports the --json argument. Use the absolute path
|
||||
# here, so it works in Debian too without using sudo.
|
||||
try:
|
||||
pmb.helpers.run.user(["losetup", "--json"], check=True)
|
||||
pmb.helpers.run.user([pmb.config.required_programs["losetup"], "--json"], check=True)
|
||||
except RuntimeError:
|
||||
losetup_missing_json = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue