Skip to content

Commit 505d3cb

Browse files
committed
The notification about the rescript binary absent was added
1 parent 6828f96 commit 505d3cb

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

server/src/server.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,20 @@ let openedFile = (fileUri: string, fileContent: string) => {
262262
// handle in the isResponseMessage check in the message handling way
263263
// below
264264
} else {
265-
// we should send something to say that we can't find bsb.exe. But right now we'll silently not do anything
265+
let binaryPath =
266+
extensionConfiguration.binaryPath === null
267+
? path.join(projectRootPath, "node_modules", ".bin")
268+
: extensionConfiguration.binaryPath;
269+
270+
let request: p.NotificationMessage = {
271+
jsonrpc: c.jsonrpcVersion,
272+
method: "window/showMessage",
273+
params: {
274+
type: p.MessageType.Error,
275+
message: `Can't find ReScript binary on path ${binaryPath}`,
276+
},
277+
};
278+
send(request);
266279
}
267280
}
268281

0 commit comments

Comments
 (0)