-
Notifications
You must be signed in to change notification settings - Fork 198
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
Return failed error when logging in #2243
Conversation
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference (preview)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Happy that we fixed this for the login case, but still have --check-status
return 0 even when we successfully detect you are logged out :-).
Previously, when
login
fails, there are cases where "Not logged in, run 'azd auth login' to login" would be printed out, but the returned exit code is zero. This is a problem in CI situations when auth isn't setup correctly, and yetlogin
is deemed successful, the CI pipeline proceeds as normal, resulting in user confusion.This change updates
login
to always exit with non-zero exit code iflogin
fails. The code has been refactored so that--check-status
plays nicely with this implementation.Fixes #2221