mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
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
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue