Skip to content

Commit

Permalink
fix(env): Do not print stacktrace for locate workspace
Browse files Browse the repository at this point in the history
Signed-off-by: Danil <[email protected]>
  • Loading branch information
Deniallugo committed May 31, 2024
1 parent eec9599 commit d1af439
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/lib/utils/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 let Err(_) = &result {
// `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()
})
Expand Down

0 comments on commit d1af439

Please sign in to comment.