diff options
Diffstat (limited to 'xmake/modules/detect/sdks/find_vstudio.lua')
| -rw-r--r-- | xmake/modules/detect/sdks/find_vstudio.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua index e7699ee0d..adfb8655d 100644 --- a/xmake/modules/detect/sdks/find_vstudio.lua +++ b/xmake/modules/detect/sdks/find_vstudio.lua @@ -294,7 +294,9 @@ function _load_vcvarsall_impl(vcvarsall, vsver, arch, opt) file:close() -- run genvcvars.bat - local outdata, errdata = try {function () return os.iorun(genvcvars_bat) end} + -- @note we use iorunv here so the bat path is not split on whitespace by os.argv, + -- which breaks detection when the temp file lives under a path with spaces. + local outdata, errdata = try {function () return os.iorunv(genvcvars_bat) end} if errdata and #errdata > 0 and option.get("verbose") and option.get("diagnosis") then cprint("${color.warning}checkinfo: ${clear dim}get vcvars error: %s", errdata) end |
