Only authenticate if the credentials provider has credentials when running in development (#25403)

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>
This commit is contained in:
Angelk90andMarshall Bowers authored and GitHub committed 2025-02-22 18:29:27 +00:00
1 parent ec427f43c2
commit f906d91bc0
1 file changed
+2 -2
+2 -2
View File
@@ -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?;