Unnamed repository; edit this file 'description' to name the repository.
Merge #10332
10332: minor: Allow overwriting RUST_BACKTRACE for the server manually r=jonas-schievink a=Veykril Trying to figure out why we aren't getting backtraces for windows builds from CI, this let's one set the backtraces to `FULL` Might be cc https://github.com/rust-lang/rust/issues/87481 bors r+ Co-authored-by: Lukas Wirth <[email protected]>
bors[bot] 2021-09-24
parent 2117ba0 · parent 983e19c · commit 377476a
-rw-r--r--crates/rust-analyzer/src/bin/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs
index f7e9415cc0..2390bee824 100644
--- a/crates/rust-analyzer/src/bin/main.rs
+++ b/crates/rust-analyzer/src/bin/main.rs
@@ -92,7 +92,9 @@ fn try_main() -> Result<()> {
}
fn setup_logging(log_file: Option<&Path>) -> Result<()> {
- env::set_var("RUST_BACKTRACE", "short");
+ if env::var("RUST_BACKTRACE").is_err() {
+ env::set_var("RUST_BACKTRACE", "short");
+ }
let log_file = match log_file {
Some(path) => {