Skip to content

Commit

Permalink
Make the fake flycheck path work on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cormacrelf committed Sep 5, 2024
1 parent 4a80b51 commit 5bf5e0d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/rust-analyzer/src/flycheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::{fmt, io, process::Command, time::Duration};

use crossbeam_channel::{select_biased, unbounded, Receiver, Sender};
use paths::{AbsPath, AbsPathBuf, Utf8Path, Utf8PathBuf};
use paths::{AbsPath, AbsPathBuf, Utf8PathBuf};
use project_model::{project_json, TargetKind};
use rustc_hash::FxHashMap;
use serde::Deserialize;
Expand Down Expand Up @@ -618,11 +618,8 @@ impl FlycheckActor {
}

fn cannot_run_workspace(&self) -> bool {
self.check_command(
PackageToRestart::All,
Some(AbsPath::assert(Utf8Path::new("/tmp/thing.txt"))),
)
.is_none()
let fake_path = self.root.join("fake.rs");
self.check_command(PackageToRestart::All, Some(&fake_path)).is_none()
}

/// Construct a `Command` object for checking the user's code. If the user
Expand Down

0 comments on commit 5bf5e0d

Please sign in to comment.