Skip to content
Snippets Groups Projects
Unverified Commit 54e55f26 authored by Oliver Smith's avatar Oliver Smith
Browse files

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.
parent 765ba770
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment