mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-24 13:13:43 +00:00
fix(test): running test as root (#1817)
* fix(test): running test as root The dummy root path /root conflicts with root user's home directory on Linux and redacts incorrectly. Our downstream CI environment builds tinymist in docker as root and encounters the problem. Change the path to `/dummy-root` fixes it. To ensure consistency, other similar occurences are also prefixed with `dummy-`. * dev: deduplicate a bit --------- Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
This commit is contained in:
parent
c0d5f0c800
commit
9d9d360db9
6 changed files with 32 additions and 40 deletions
|
@ -52,9 +52,9 @@ pub fn run_with_sources<T>(source: &str, f: impl FnOnce(&mut LspUniverse, PathBu
|
|||
});
|
||||
|
||||
let root = if cfg!(windows) {
|
||||
PathBuf::from("C:\\root")
|
||||
PathBuf::from("C:\\dummy-root")
|
||||
} else {
|
||||
PathBuf::from("/root")
|
||||
PathBuf::from("/dummy-root")
|
||||
};
|
||||
let mut verse = LspUniverseBuilder::build(
|
||||
EntryState::new_rooted(root.as_path().into(), None),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue