Skip to content

Commit 983e19c

Browse files
committed
Allow setting RUST_BACKTRACE for the server manually
1 parent d598d0b commit 983e19c

File tree

1 file changed

+3
-1
lines changed
  • crates/rust-analyzer/src/bin

1 file changed

+3
-1
lines changed

crates/rust-analyzer/src/bin/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ fn try_main() -> Result<()> {
9292
}
9393

9494
fn setup_logging(log_file: Option<&Path>) -> Result<()> {
95-
env::set_var("RUST_BACKTRACE", "short");
95+
if env::var("RUST_BACKTRACE").is_err() {
96+
env::set_var("RUST_BACKTRACE", "short");
97+
}
9698

9799
let log_file = match log_file {
98100
Some(path) => {

0 commit comments

Comments
 (0)