Skip to content

Commit

Permalink
Tweak message when we're not looking on the PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-mccall committed May 12, 2020
1 parent 0d431c9 commit e82e464
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,14 @@ class UI {
}

async promptInstall(version: string) {
const message = 'The clangd language server was not found on your PATH.\n' +
`Would you like to download and install clangd ${version}?`;
const p = this.clangdPath;
let message = '';
if (p.indexOf(path.sep) < 0) {
message += 'The ${p} language server was not found on your PATH.\n';
} else {
message += `The clangd binary '${p}' was not found.\n`;
}
message += `Would you like to download and install clangd ${version}?`;
if (await vscode.window.showInformationMessage(message, 'Install'))
common.installLatest(this);
}
Expand Down

0 comments on commit e82e464

Please sign in to comment.