pmbootstrap log: use tail -F, not -f (MR 1982)
Let tail attempt to open the file again, if it becomes inaccessible. This is useful, when writing a reproducer that deletes pmbootstrap's log.txt while at the same time running 'pmbootstrap log'. (027724) [17:57:34] Done tail: '/home/user/.local/var/pmbootstrap/log.txt' has become inaccessible: No such file or directory tail: '/home/user/.local/var/pmbootstrap/log.txt' has appeared; following new file (003493) [17:57:35] % cd /home/user/.local/var/pmbootstrap/cache_git/pmaports; git remote -v
This commit is contained in:
parent
496be6f593
commit
3f10399db3
|
@ -451,7 +451,7 @@ def work_migrate(args):
|
|||
def log(args):
|
||||
if args.clear_log:
|
||||
pmb.helpers.run.user(args, ["truncate", "-s", "0", args.log])
|
||||
pmb.helpers.run.user(args, ["tail", "-f", args.log, "-n", args.lines],
|
||||
pmb.helpers.run.user(args, ["tail", "-F", args.log, "-n", args.lines],
|
||||
output="tui")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue