Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config): Could not find an executable binary on windows #664

Closed
wants to merge 1 commit into from

Conversation

NavyD
Copy link

@NavyD NavyD commented Jan 23, 2025

Fixes #663

Copy link
Contributor

Review Checklist

Does this PR follow the Contribution Guidelines? Following is a partial checklist:

Proper conventional commit scoping:

  • For example, fix(lsp): some lsp-related bugfix

  • Pull request title has the appropriate conventional commit prefix.

If applicable:

  • Tested
    • Tests have been added.
    • Tested manually (Steps to reproduce in PR description).
  • Updated documentation.

@@ -283,7 +283,7 @@ local RustaceanDefaultConfig = {
end,
---@type string[] | fun():(string[]|fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient)
cmd = function()
return { 'rust-analyzer', '--log-file', RustaceanConfig.server.logfile }
return { vim.fn.exepath('rust-analyzer'), '--log-file', RustaceanConfig.server.logfile }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: vim.fn.exepath can return an empty string, with would break the error message in the health check. We should fall back to 'rust-analyzer' in this case.

@NavyD
Copy link
Author

NavyD commented Jan 23, 2025

Thanks for the review, now added conditional fallback to 'rust-analyzer'

Comment on lines 285 to 287
cmd = function()
return { 'rust-analyzer', '--log-file', RustaceanConfig.server.logfile }
return { vim.fn.exepath('rust-analyzer') or 'rust-analyzer', '--log-file', RustaceanConfig.server.logfile }
end,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: This won't work.
I've implemented a fix in #665.

@mrcjkb mrcjkb closed this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not find an executable binary on windows
2 participants