Skip to content

Commit 527e53d

Browse files
author
Andrew Hall
authored
Fix check for rzls being present (#7462)
1 parent 36f32f5 commit 527e53d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/razor/src/razorLanguageServerOptionsResolver.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ function findLanguageServerExecutable(withinDir: string) {
5454
}
5555

5656
let pathWithExtension = `${fileName}${extension}`;
57-
if (!fs.existsSync(pathWithExtension)) {
57+
let fullPath = path.join(withinDir, pathWithExtension);
58+
59+
if (!fs.existsSync(fullPath)) {
5860
// We might be running a platform neutral vsix which has no executable, instead we run the dll directly.
5961
pathWithExtension = `${fileName}.dll`;
62+
fullPath = path.join(withinDir, pathWithExtension);
6063
}
6164

62-
const fullPath = path.join(withinDir, pathWithExtension);
63-
6465
if (!fs.existsSync(fullPath)) {
6566
throw new Error(
6667
vscode.l10n.t("Could not find Razor Language Server executable '{0}' within directory", fullPath)

0 commit comments

Comments
 (0)