Only apply host-side executable fix to binaries downloaded by the extension (#10318)
This PR makes it so our temporary host-side workaround for setting certain language server binaries as executable only applies to binaries that are downloaded by the extension. Previously we would do this for any binary, including ones that could have been sourced from the $PATH. Release Notes: - Fixed a file permissions issue when trying to use a Zig language server (`zls`) present on the $PATH.
This commit is contained in:
parent
4fb9f41e69
commit
8205c52d2b
1 changed files with 3 additions and 1 deletions
|
@ -79,7 +79,9 @@ impl LspAdapter for ExtensionLspAdapter {
|
|||
// We can remove once the following extension versions no longer see any use:
|
||||
// - toml@0.0.2
|
||||
// - zig@0.0.1
|
||||
if ["toml", "zig"].contains(&self.extension.manifest.id.as_ref()) {
|
||||
if ["toml", "zig"].contains(&self.extension.manifest.id.as_ref())
|
||||
&& path.starts_with(&self.host.work_dir)
|
||||
{
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
use std::fs::{self, Permissions};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue