mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Give better error message when the rust-analyzer binar path was set in the user's config but the binary is invalid
This commit is contained in:
parent
da894358e1
commit
ac50e35325
1 changed files with 6 additions and 1 deletions
|
@ -252,7 +252,12 @@ async function bootstrapServer(config: Config, state: PersistentState): Promise<
|
|||
log.info("Using server binary at", path);
|
||||
|
||||
if (!isValidExecutable(path)) {
|
||||
throw new Error(`Failed to execute ${path} --version`);
|
||||
if (config.serverPath) {
|
||||
throw new Error(`Failed to execute ${path} --version. \`config.server.path\` or \`config.serverPath\` has been set explicitly.\
|
||||
Consider removing this config or making a valid server binary available at that path.`);
|
||||
} else {
|
||||
throw new Error(`Failed to execute ${path} --version`);
|
||||
}
|
||||
}
|
||||
|
||||
return path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue