Skip to content

Commit 76fc870

Browse files
committed
fix gcc in install compilers
1 parent ea8360c commit 76fc870

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/compilers.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,13 +562,15 @@ export async function listCompilersImpl(): Promise<DetectedCompiler[]> {
562562
});
563563

564564
// test compilers in $PATH
565-
const compilers = ["dmd", "ldc2", "ldc", "gdc", "gcc"];
565+
const compilers = ["dmd", "ldc2", "ldc", "gdc", "gcc"] as const;
566566
for (let i = 0; i < compilers.length; i++) {
567567
const check = compilers[i];
568568
let result = await checkCompiler(<any>check);
569569
fallbackPath = fallbackPath || result.path;
570570
if (result && result.has) {
571-
result.has = check == "ldc2" ? "ldc" : <any>check;
571+
result.has = check == "ldc2" ? "ldc"
572+
: check == "gcc" ? "gdc"
573+
: check;
572574
ret.push(result);
573575
if (check == "ldc2" || check == "gdc")
574576
i++; // skip ldc / gcc

0 commit comments

Comments
 (0)