We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74ba62a commit 0167621Copy full SHA for 0167621
server/src/utils.ts
@@ -39,14 +39,14 @@ export let findProjectRootOfFile = (
39
};
40
41
export let findBinaryFromProjectRoot = (
42
- source: p.DocumentUri
+ projectRootPath: p.DocumentUri // This must be a directory and not a file!
43
): null | p.DocumentUri => {
44
- let dir = path.dirname(source);
45
- let bscNativeReScriptPath = path.join(dir, c.nodeModulesBinDir);
+ let dir = path.dirname(projectRootPath);
+ let bscNativeReScriptPath = path.join(projectRootPath, c.nodeModulesBinDir);
46
47
if (fs.existsSync(bscNativeReScriptPath)) {
48
return bscNativeReScriptPath;
49
- } else if (dir === source) {
+ } else if (dir === projectRootPath) {
50
// reached the top
51
return null;
52
} else {
0 commit comments