Skip to content

Commit d7bc10a

Browse files
committed
Make utils.findReScriptVersionForProjectRoot async
1 parent 032026e commit d7bc10a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ let openedFile = async (fileUri: string, fileContent: string) => {
271271
filesDiagnostics: {},
272272
namespaceName:
273273
namespaceName.kind === "success" ? namespaceName.result : null,
274-
rescriptVersion: utils.findReScriptVersionForProjectRoot(projectRootPath),
274+
rescriptVersion: await utils.findReScriptVersionForProjectRoot(projectRootPath),
275275
bsbWatcherByEditor: null,
276276
bscBinaryLocation: await utils.findBscExeBinary(projectRootPath),
277277
editorAnalysisLocation: await utils.findEditorAnalysisBinary(projectRootPath),

server/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ export let findReScriptVersion = async (
260260
}
261261
};
262262

263-
export function findReScriptVersionForProjectRoot(projectRootPath: string) : string | undefined {
264-
const bscExe = findBinary(findPlatformPath(projectRootPath), c.bscExeName);
263+
export async function findReScriptVersionForProjectRoot(projectRootPath: string): Promise<string | undefined> {
264+
const bscExe = await findBscExeBinary(projectRootPath)
265265

266266
if (bscExe == null) {
267267
return undefined;

0 commit comments

Comments
 (0)