diff options
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_program.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua index 5397e488e..a2cd2105e 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua @@ -55,7 +55,12 @@ function sandbox_lib_detect_find_program._check(program, opt) -- no check script? attempt to run it directly if not opt.check then - return 0 == os.execv(program, {"--version"}, {stdout = os.nuldev(), stderr = os.nuldev(), envs = opt.envs}) + local stdout, stderr + if not option.get("diagnosis") then + stdout = os.nuldev() + stderr = os.nuldev() + end + return 0 == os.execv(program, {"--version"}, {stdout = stdout, stderr = stderr, envs = opt.envs}) end -- check it |
