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:
Oliver Smith 2020-10-07 17:58:09 +02:00
parent 496be6f593
commit 3f10399db3
No known key found for this signature in database
GPG Key ID: 72D843B89D4DD756
1 changed files with 1 additions and 1 deletions

View File

@ -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")