mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 02:57:34 +00:00
elixir: Make files required by elixir-ls executable (#16819)
Closes: - #15802 This PR fixes an issue in the `elixir-ls` language server installation where some of the required scripts was not being made executable when installed from GitHub. Release Notes: - Fixed elixir-rs files not being executable ([#15802](https://github.com/zed-industries/zed/issues/15802))
This commit is contained in:
parent
5e55d5507f
commit
dd8d52f4f4
1 changed files with 9 additions and 7 deletions
|
@ -55,13 +55,11 @@ impl ElixirLs {
|
|||
|
||||
let (platform, _arch) = zed::current_platform();
|
||||
let version_dir = format!("elixir-ls-{}", release.version);
|
||||
let binary_path = format!(
|
||||
"{version_dir}/language_server.{extension}",
|
||||
extension = match platform {
|
||||
zed::Os::Mac | zed::Os::Linux => "sh",
|
||||
zed::Os::Windows => "bat",
|
||||
}
|
||||
);
|
||||
let extension = match platform {
|
||||
zed::Os::Mac | zed::Os::Linux => "sh",
|
||||
zed::Os::Windows => "bat",
|
||||
};
|
||||
let binary_path = format!("{version_dir}/language_server.{extension}");
|
||||
|
||||
if !fs::metadata(&binary_path).map_or(false, |stat| stat.is_file()) {
|
||||
zed::set_language_server_installation_status(
|
||||
|
@ -76,6 +74,10 @@ impl ElixirLs {
|
|||
)
|
||||
.map_err(|e| format!("failed to download file: {e}"))?;
|
||||
|
||||
zed::make_file_executable(&binary_path)?;
|
||||
zed::make_file_executable(&format!("{version_dir}/launch.{extension}"))?;
|
||||
zed::make_file_executable(&format!("{version_dir}/debug_adapter.{extension}"))?;
|
||||
|
||||
let entries =
|
||||
fs::read_dir(".").map_err(|e| format!("failed to list working directory {e}"))?;
|
||||
for entry in entries {
|
||||
|
|
Loading…
Reference in a new issue