WIP: avoid code-signing rust-analyzer to prevent proc macro errors
If this works, I think we should set the permissions asynchronously, maybe as part of starting the language server, so that we avoid doing synchronous I/O.
This commit is contained in:
@@ -260,8 +260,15 @@ impl Language {
|
||||
|
||||
const ZED_BUNDLE: Option<&'static str> = option_env!("ZED_BUNDLE");
|
||||
let binary_path = if ZED_BUNDLE.map_or(Ok(false), |b| b.parse())? {
|
||||
cx.platform()
|
||||
.path_for_resource(Some(&config.binary), None)?
|
||||
let bundled_path = cx
|
||||
.platform()
|
||||
.path_for_resource(Some(&config.binary), None)?;
|
||||
std::fs::set_permissions(
|
||||
&bundled_path,
|
||||
<std::fs::Permissions as std::os::unix::fs::PermissionsExt>::from_mode(0o755),
|
||||
)
|
||||
.unwrap();
|
||||
bundled_path
|
||||
} else {
|
||||
Path::new(&config.binary).to_path_buf()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user