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
@ -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…
Reference in New Issue
Block a user