Skip to content

Commit

Permalink
Add the MinGW path to the environment if we know it (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbrow authored Dec 26, 2019
1 parent df7295a commit b4c0374
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,15 @@ export async function effectiveKitEnvironment(kit: Kit, opts?: expand.ExpansionO
util.map(util.chain(host_env, kit_env, vs_vars), ([k, v]): [string, string] => [k.toLocaleUpperCase(), v]));
}
}
return new Map(util.chain(host_env, kit_env));
const env = new Map(util.chain(host_env, kit_env));
if (env.has("CMT_MINGW_PATH")) {
if (env.has("PATH")) {
env.set("PATH", env.get("PATH")!.concat(`;${env.get("CMT_MINGW_PATH")}`));
} else if (env.has("Path")) {
env.set("Path", env.get("Path")!.concat(`;${env.get("CMT_MINGW_PATH")}`));
}
}
return env;
}

export async function findCLCompilerPath(env: Map<string, string>): Promise<string|null> {
Expand Down

0 comments on commit b4c0374

Please sign in to comment.