diff options
| author | ruki <[email protected]> | 2024-11-10 11:43:35 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-10 11:43:35 +0800 |
| commit | bfaaf9c4dd380e88be0e45e520534248f7be4859 (patch) | |
| tree | e41d0431e4182d03abe55037d41d0b28fbb0384e | |
| parent | 59c56e8e11a2b4de3038ca433a23b144e70039bd (diff) | |
| parent | b644871f11652acb0b77f7e480f7b10ce0ea1715 (diff) | |
Merge pull request #5804 from Elite-stay/patch-2
Improve user experience
| -rw-r--r-- | xmake/modules/detect/sdks/find_qt.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua index 5cb77f9ad..1a9e79f76 100644 --- a/xmake/modules/detect/sdks/find_qt.lua +++ b/xmake/modules/detect/sdks/find_qt.lua @@ -192,7 +192,18 @@ end -- get qt environment function _get_qtenvs(qmake) local envs = {} - local results = try {function () return os.iorunv(qmake, {"-query"}) end} + local results = try { + function () + return os.iorunv(qmake, {"-query"}) + end, + catch { + function (errors) + if errors then + dprint(tostring(errors)) + end + end + } + } if results then for _, qtenv in ipairs(results:split('\n', {plain = true})) do local kv = qtenv:split(':', {plain = true, limit = 2}) -- @note set limit = 2 for supporting value with win-style path, e.g. `key:C:\xxx` @@ -200,8 +211,8 @@ function _get_qtenvs(qmake) envs[kv[1]] = kv[2]:trim() end end + return envs end - return envs end -- find qt sdk toolchains |
