Skip to content

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented Aug 24, 2022

Fix #23320

Related command
az login

Description
Currently device code message is printed using logger.warning which is controlled by core.only_show_errors config option. If core.only_show_errors is set to true, device code message will be hidden.

This PR switches to print_styled_text so that device code message is printed directly to sys.stderr, regardless of core.only_show_errors config option.

Testing Guide

az login --use-device-code

@ghost ghost added Auto-Assign Auto assign by bot Core CLI core infrastructure labels Aug 24, 2022
@ghost ghost requested a review from yonzhan August 24, 2022 05:39
@ghost ghost assigned jiasli Aug 24, 2022
@ghost ghost added this to the Aug 2022 (2022-09-06) milestone Aug 24, 2022
@jiasli
Copy link
Member Author

jiasli commented Aug 24, 2022

Interesting thing is that at the very beginning print is used (#72):

6beafec#diff-cab8e9aacb616771cc8bc960f81835d6b768d2438a8b9e5ea188319702c1acbeR39

#210 then switched to logger.warning:

0922c6e#diff-51f92645190e8ca2270fc0f699228ffe4d39e89c2a05b68832a09b1be3a47cd3R242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Core CLI core infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az login --use-device-code should always show device code

2 participants