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

@ -562,11 +562,12 @@ def work_migrate(args: PmbArgs):
def log(args: PmbArgs):
context = pmb.core.get_context()
log_testsuite = pmb.config.work / "log_testsuite.txt"
if args.clear_log:
pmb.helpers.run.user(args, ["truncate", "-s", "0", args.log])
pmb.helpers.run.user(args, ["truncate", "-s", "0", log_testsuite])
pmb.helpers.run.user(["truncate", "-s", "0", context.log])
pmb.helpers.run.user(["truncate", "-s", "0", log_testsuite])
cmd: List[PathString] = ["tail", "-n", args.lines, "-F"]
@ -578,9 +579,9 @@ def log(args: PmbArgs):
# tail writes the last lines of the files to the terminal. Put the regular
# log at the end, so that output is visible at the bottom (where the user
# looks for an error / what's currently going on).
cmd += [args.log]
cmd += [context.log]
pmb.helpers.run.user(args, cmd, output="tui")
pmb.helpers.run.user(cmd, output="tui")
def zap(args: PmbArgs):