forked from Mirror/pmbootstrap
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:
parent
02f04ba3a8
commit
05c86be11c
42 changed files with 161 additions and 160 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue