From 889623c7b7f84458e56af5d87bb9150265fdf7f1 Mon Sep 17 00:00:00 2001 From: Luna Hart Date: Sun, 17 Dec 2023 04:57:26 -0800 Subject: [PATCH] Status commands write to stderr on non-zero return (#27) * Status commands write to stderr on non-zero return * Bumped package version --------- Co-authored-by: hedger --- VERSION.txt | 2 +- ufbt/bootstrap.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index f33f5ed..49dc353 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.2.4.3 \ No newline at end of file +0.2.4.4 diff --git a/ufbt/bootstrap.py b/ufbt/bootstrap.py index 4cefb18..043c39e 100644 --- a/ufbt/bootstrap.py +++ b/ufbt/bootstrap.py @@ -717,7 +717,10 @@ def _func(self, args) -> int: for key, value in state_data.items(): log.info(f"{self.STATUS_FIELDS[key]:<15} {value}") - return 1 if state_data.get("error") else 0 + if state_data.get("error"): + log.error("Status error: {}".format(state_data.get("error"))) + return 1 + return 0 bootstrap_subcommand_classes = (UpdateSubcommand, CleanSubcommand, StatusSubcommand)