Skip to content

Commit 696c792

Browse files
committed
Find other binaries via compiler-info.json
1 parent f477ca7 commit 696c792

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

server/src/utils.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ let findBinary = async (
9292
return path.join(config.extensionConfiguration.platformPath, binary);
9393
}
9494

95-
if (projectRootPath !== null && binary === "bsc.exe") {
95+
if (projectRootPath !== null) {
9696
try {
9797
const compilerInfo = path.resolve(
9898
projectRootPath,
@@ -101,7 +101,13 @@ let findBinary = async (
101101
const contents = await fsAsync.readFile(compilerInfo, "utf8");
102102
const compileInfo = JSON.parse(contents);
103103
if (compileInfo && compileInfo.bsc_path) {
104-
return compileInfo.bsc_path;
104+
const bsc_path = compileInfo.bsc_path;
105+
if (binary === "bsc.exe") {
106+
return bsc_path;
107+
} else {
108+
const binary_path = path.join(path.dirname(bsc_path), binary);
109+
return binary_path;
110+
}
105111
}
106112
} catch {}
107113
}

0 commit comments

Comments
 (0)