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

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Nathan Sobo 2022-03-23 12:18:17 -06:00
parent ee9ed936e4
commit 657b92b020

View file

@ -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>(())