fix vccexe not using correct path for detecting vcvarsall (#10364)

This commit is contained in:
Neelesh Chandola 2019-01-21 14:35:23 +05:30 • committed by Andreas Rumpf
commit 5491f40d54

View file

@ -16,7 +16,7 @@ type
vs140 = (140, "VS140COMNTOOLS") ## Visual Studio 2015 vs140 = (140, "VS140COMNTOOLS") ## Visual Studio 2015
const const
vcvarsallRelativePath = joinPath("..", "..", "VC", "vcvarsall") ## Relative path from the COMNTOOLS path to the vcvarsall file. vcvarsallRelativePath = joinPath("..", "..", "VC", "vcvarsall.bat") ## Relative path from the COMNTOOLS path to the vcvarsall file.
proc vccEnvVcVarsAllPath*(version: VccEnvVersion = vsUndefined): string = proc vccEnvVcVarsAllPath*(version: VccEnvVersion = vsUndefined): string =
## Returns the path to the VCC Developer Command Prompt executable for the specified VCC version. ## Returns the path to the VCC Developer Command Prompt executable for the specified VCC version.
@ -44,4 +44,4 @@ proc vccEnvVcVarsAllPath*(version: VccEnvVersion = vsUndefined): string =
let key = $version let key = $version
let val = getEnv key let val = getEnv key
if val.len > 0: if val.len > 0:
result = try: expandFilename(val & vcvarsallRelativePath) except OSError: "" result = try: expandFilename(joinPath(val, vcvarsallRelativePath)) except OSError: ""