Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status commands write to stderr on non-zero return #27

Merged
merged 2 commits into from
Dec 17, 2023

Conversation

Nitepone
Copy link
Contributor

Currently, calling sub commands of ufbt status will suppress logging of the "error" value.

$> ufbt status
13:40:00.312 [I] uFBT version    0.2.4.3
13:40:00.312 [I] State dir       /home/luna/.ufbt
13:40:00.312 [I] Download dir    /home/luna/.ufbt/download
13:40:00.312 [I] SDK dir         /home/luna/.ufbt/current
13:40:00.312 [I] Toolchain dir   /home/luna/.ufbt/toolchain
13:40:00.312 [I] Error           SDK is not deployed
$> ufbt status sdk_dir
/home/luna/.ufbt/current
$> echo $?
1

With this change, whenever ufbt status returns non zero due to an "error" being set, it will also log the error to stderr.

$> python3 flipperzero-ufbt/ufbt/bootstrap.py status sdk_dir
/home/luna/.ufbt/current
13:42:30.151 [E] Status error: SDK is not deployed

@hedger hedger self-assigned this Dec 13, 2023
@hedger hedger merged commit 889623c into flipperdevices:dev Dec 17, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants