Skip to content

Commit

Permalink
fix: windows absolute path not converted correctly, use relative path…
Browse files Browse the repository at this point in the history
… instead
  • Loading branch information
luckydye committed Oct 19, 2024
1 parent f21dd4a commit f31cb90
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/biome.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::{
env,
path::{Path, PathBuf},
};
use std::path::{Path, PathBuf};
use zed::settings::LspSettings;
use zed_extension_api::{
self as zed,
Expand Down Expand Up @@ -181,14 +178,11 @@ impl zed::Extension for BiomeExtension {
return Err(err);
}

let server_path = Path::new(env::current_dir().unwrap().as_os_str())
.join("./node_modules")
.join(self.binary_specifier()?)
.to_string_lossy()
.to_string();
let mut server_path = PathBuf::from("./node_modules");
server_path.push(self.binary_specifier()?);

Ok(zed::Command {
command: server_path,
command: server_path.to_string_lossy().to_string(),
args,
env: Default::default(),
})
Expand Down

0 comments on commit f31cb90

Please sign in to comment.