Skip to content

Commit

Permalink
fix gcc in install compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Sep 21, 2024
1 parent ea8360c commit 76fc870
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/compilers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,13 +562,15 @@ export async function listCompilersImpl(): Promise<DetectedCompiler[]> {
});

// test compilers in $PATH
const compilers = ["dmd", "ldc2", "ldc", "gdc", "gcc"];
const compilers = ["dmd", "ldc2", "ldc", "gdc", "gcc"] as const;
for (let i = 0; i < compilers.length; i++) {
const check = compilers[i];
let result = await checkCompiler(<any>check);
fallbackPath = fallbackPath || result.path;
if (result && result.has) {
result.has = check == "ldc2" ? "ldc" : <any>check;
result.has = check == "ldc2" ? "ldc"
: check == "gcc" ? "gdc"
: check;
ret.push(result);
if (check == "ldc2" || check == "gdc")
i++; // skip ldc / gcc
Expand Down

0 comments on commit 76fc870

Please sign in to comment.