From 09d1e48d6be025efc1fafc410049174b1efb39ff Mon Sep 17 00:00:00 2001 From: Danil Date: Fri, 31 May 2024 10:52:00 +0200 Subject: [PATCH] fix(env): Do not print stacktrace for locate workspace Signed-off-by: Danil --- core/lib/utils/src/env.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/lib/utils/src/env.rs b/core/lib/utils/src/env.rs index fec413927929..0eddc6c2cd64 100644 --- a/core/lib/utils/src/env.rs +++ b/core/lib/utils/src/env.rs @@ -52,10 +52,12 @@ pub fn locate_workspace() -> Option<&'static Path> { WORKSPACE .get_or_init(|| { let result = locate_workspace_inner(); - if let Err(err) = &result { + if result.is_err() { // `get_or_init()` is guaranteed to call the provided closure once per `OnceCell`; // i.e., we won't spam logs here. - tracing::warn!("locate_workspace() failed: {err:?}"); + tracing::info!( + "locate_workspace() failed. You are using an already compiled version" + ); } result.ok() })