show the status output on failure (MR 2472)

There is a lot of context and state management needed when using
pmbootstrap, sometimes it can be a lot to keep in your head. Let's print
the output of "pmbootstrap status" when stuff goes wrong, this might
help remind people if e.g. their pmaports checkout is on the wrong
branch, or they're building for the wrong device.

Additionally, don't print the "run pmbootstrap log for details" message
if pmbootstrap was called with --details-to-stdout

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-11-02 17:15:27 +01:00 committed by Robert Eckelmann
parent 3b4b9cd061
commit 39235fedfb
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
4 changed files with 18 additions and 10 deletions

View file

@ -554,7 +554,7 @@ def lint(args: PmbArgs) -> None:
def status(args: PmbArgs) -> NoReturn:
pmb.helpers.status.print_status(args)
pmb.helpers.status.print_status()
# Do not print the DONE! line
sys.exit(0)