From c7a241e1123230be947d69e562f2168d0298df00 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Tue, 15 Jul 2025 18:13:54 -0700 Subject: [PATCH] add an `I_KNOW_TY_IS_PRE_RELEASE` env var to turn off the pre-release warning --- crates/ty/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/ty/src/lib.rs b/crates/ty/src/lib.rs index f3a0bdaf26..bd20dffdc0 100644 --- a/crates/ty/src/lib.rs +++ b/crates/ty/src/lib.rs @@ -68,10 +68,12 @@ fn run_check(args: CheckCommand) -> anyhow::Result { let printer = Printer::default().with_verbosity(verbosity); - tracing::warn!( - "ty is pre-release software and not ready for production use. \ + if std::env::var_os("I_KNOW_TY_IS_PRE_RELEASE").is_none() { + tracing::warn!( + "ty is pre-release software and not ready for production use. \ Expect to encounter bugs, missing features, and fatal errors.", - ); + ); + } tracing::debug!("Version: {}", version::version());