Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Don't upload panic files when running in a PTY
Max Brunsfeldeb6088701e6c
diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rsindex 78a435be704..2a01236b024 100644--- a/crates/zed/src/main.rs+++ b/crates/zed/src/main.rs@@ -119,7 +119,9 @@ fn main() {));watch_settings_file(default_settings, settings_file_content, themes.clone(), cx);- upload_previous_panics(http.clone(), cx);+ if !stdout_is_a_pty() {+ upload_previous_panics(http.clone(), cx);+ }let client = client::Client::new(http.clone(), cx);let mut languages = LanguageRegistry::new(login_shell_env_loaded);@@ -330,18 +332,17 @@ fn init_panic_hook(app_version: String) {),};- let panic_filename = chrono::Utc::now().format("%Y_%m_%d %H_%M_%S").to_string();- std::fs::write(- paths::LOGS_DIR.join(format!("zed-{}-{}.panic", app_version, panic_filename)),- &message,- )- .context("error writing panic to disk")- .log_err();-if is_pty {eprintln!("{}", message);} else {log::error!(target: "panic", "{}", message);+ let panic_filename = chrono::Utc::now().format("%Y_%m_%d %H_%M_%S").to_string();+ std::fs::write(+ paths::LOGS_DIR.join(format!("zed-{}-{}.panic", app_version, panic_filename)),+ &message,+ )+ .context("error writing panic to disk")+ .log_err();}}));}