windows: Fix package-version-server
(#13821)
Now, it can run on windows.  Release Notes: - N/A
This commit is contained in:
parent
818e6e53d6
commit
d450a1d9e6
1 changed files with 9 additions and 3 deletions
|
@ -317,8 +317,11 @@ impl LspAdapter for NodeVersionAdapter {
|
||||||
delegate: &dyn LspAdapterDelegate,
|
delegate: &dyn LspAdapterDelegate,
|
||||||
) -> Result<LanguageServerBinary> {
|
) -> Result<LanguageServerBinary> {
|
||||||
let version = latest_version.downcast::<GitHubLspBinaryVersion>().unwrap();
|
let version = latest_version.downcast::<GitHubLspBinaryVersion>().unwrap();
|
||||||
let destination_path =
|
let destination_path = container_dir.join(format!(
|
||||||
container_dir.join(format!("package-version-server-{}", version.name));
|
"package-version-server-{}{}",
|
||||||
|
version.name,
|
||||||
|
std::env::consts::EXE_SUFFIX
|
||||||
|
));
|
||||||
let destination_container_path =
|
let destination_container_path =
|
||||||
container_dir.join(format!("package-version-server-{}-tmp", version.name));
|
container_dir.join(format!("package-version-server-{}-tmp", version.name));
|
||||||
if fs::metadata(&destination_path).await.is_err() {
|
if fs::metadata(&destination_path).await.is_err() {
|
||||||
|
@ -340,7 +343,10 @@ impl LspAdapter for NodeVersionAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
fs::copy(
|
fs::copy(
|
||||||
destination_container_path.join("package-version-server"),
|
destination_container_path.join(format!(
|
||||||
|
"package-version-server{}",
|
||||||
|
std::env::consts::EXE_SUFFIX
|
||||||
|
)),
|
||||||
&destination_path,
|
&destination_path,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue