Skip to content

Commit 7d83bbd

Browse files
committed
Check EmmyLua binary path is a file
1 parent 7fa9963 commit 7d83bbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/emmylua.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ impl EmmyLuaExtension {
1717
if let Ok(lsp_settings) = zed::settings::LspSettings::for_worktree("emmylua", worktree) {
1818
if let Some(binary) = lsp_settings.binary {
1919
if let Some(path) = binary.path {
20-
return Ok(path);
20+
if fs::metadata(&path).map_or(false, |m| m.is_file()) {
21+
return Ok(path);
22+
}
2123
}
2224
}
2325
}

0 commit comments

Comments
 (0)