helpers: drop args from helpers.run functions (MR 2252)

Now we can run commands without needs args available!

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-05-24 18:24:34 +02:00 committed by Oliver Smith
parent 02f04ba3a8
commit 05c86be11c
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
42 changed files with 161 additions and 160 deletions

View file

@ -35,14 +35,14 @@ def download(args: PmbArgs, url, prefix, cache=True, loglevel=logging.INFO,
"""
# Create cache folder
if not os.path.exists(pmb.config.work / "cache_http"):
pmb.helpers.run.user(args, ["mkdir", "-p", pmb.config.work / "cache_http"])
pmb.helpers.run.user(["mkdir", "-p", pmb.config.work / "cache_http"])
# Check if file exists in cache
path = pmb.config.work / "cache_http" / cache_file(prefix, url)
if os.path.exists(path):
if cache:
return path
pmb.helpers.run.user(args, ["rm", path])
pmb.helpers.run.user(["rm", path])
# Offline and not cached
if args.offline: