Don't prompt for keychain access when launching from a pty

Nathan Sobo and Max Brunsfeld created

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>

Change summary

crates/zed/src/main.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/zed/src/main.rs 🔗

@@ -81,7 +81,7 @@ fn main() {
         cx.spawn({
             let client = client.clone();
             |cx| async move {
-                if client.has_keychain_credentials(&cx) {
+                if !stdout_is_a_pty() && client.has_keychain_credentials(&cx) {
                     client.authenticate_and_connect(true, &cx).await?;
                 }
                 Ok::<_, anyhow::Error>(())