Only authenticate if the credentials provider has credentials when running in development (#25403)
Angelk90
and
Marshall Bowers
created
Closes #25394
Release Notes:
- N/A
Scenarios:
| Scenarios | What it does |
|------|--------|
| Interactive Terminal + Impersonate Active Login | Login without saved
credentials |
| Interactive Terminal + Saved credentials | Login with saved
credentials |
| Interactive Terminal + No credentials | Does nothing |
| Non-interactive Terminal + Saved credentials | Login with saved
credentials |
| Non-interactive Terminal + No credentials | Does nothing |
@maxdeviant : You can take a look at it.
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Change summary
crates/zed/src/main.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Detailed changes
@@ -732,8 +732,8 @@ async fn authenticate(client: Arc<Client>, cx: &AsyncApp) -> Result<()> {
if stdout_is_a_pty() {
if client::IMPERSONATE_LOGIN.is_some() {
client.authenticate_and_connect(false, cx).await?;
- } else {
- client.authenticate_and_connect(true, cx).await?
+ } else if client.has_credentials(cx).await {
+ client.authenticate_and_connect(true, cx).await?;
}
} else if client.has_credentials(cx).await {
client.authenticate_and_connect(true, cx).await?;