diff options
| author | ruki <[email protected]> | 2026-05-03 21:09:19 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-05-03 21:09:19 +0800 |
| commit | 8bbbb2860fdd1910db466fe318ee8d465728ca32 (patch) | |
| tree | 8660cf81b640c9a116a068fd2b105da92bc57cd5 /xmake/modules/detect/sdks/find_vstudio.lua | |
| parent | 1e431c685f2f2b4f28e6995e256fc6c7c4bf3d13 (diff) | |
| parent | 7778b7cb39646016c30bf3c6bf1e1897edc26529 (diff) | |
Merge pull request #7523 from DavidWang19/fix/detect-bat-path-with-spaces
Fix msvc/intel/snippet detect when temp path contains spaces
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 |
