Skip to content

Commit

Permalink
fix windows path error (zed-extensions#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
zcg committed Nov 2, 2024
1 parent fe99267 commit ddb0417
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id = "vue"
name = "Vue"
description = "Vue support."
version = "0.1.2"
version = "0.1.3"
schema_version = 1
authors = ["Zed Industries <[email protected]>"]
repository = "https://github.com/zed-extensions/vue"
Expand Down
1 change: 1 addition & 0 deletions grammars/vue
Submodule vue added at 7e4855
15 changes: 9 additions & 6 deletions src/vue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,15 @@ impl zed::Extension for VueExtension {
command: zed::node_binary_path()?,
args: vec![
env::current_dir()
.unwrap()
.join(&server_path)
.to_string_lossy()
.to_string(),
"--stdio".to_string(),
],
.unwrap()
.join(&server_path)
.canonicalize()
.unwrap_or_else(|_| env::current_dir().unwrap().join(&server_path))
.to_str()
.unwrap()
.replace("/C:", "C:")
.replace("\\", "/")
, "--stdio".to_string()],
env: Default::default(),
})
}
Expand Down

0 comments on commit ddb0417

Please sign in to comment.