From 4707d9f3fb69841d1185ef63ad01b764a5f4b6b1 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 24 Dec 2020 23:38:57 +0800 Subject: improve find_program --- xmake/core/sandbox/modules/import/lib/detect/find_program.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 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 51cc45e69..8e466bbd2 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_program.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_program.lua @@ -56,7 +56,7 @@ function sandbox_lib_detect_find_program._check(program, opt) -- no check script? attempt to run it directly if not opt.check then local ok, errors = os.runv(program, {"--version"}, {envs = opt.envs}) - if not ok and option.get("diagnosis") then + if not ok and option.get("verbose") and option.get("diagnosis") then utils.cprint("${color.warning}checkinfo: ${clear dim}" .. errors) end return ok @@ -72,7 +72,7 @@ function sandbox_lib_detect_find_program._check(program, opt) end -- check failed? print verbose error info - if not ok and option.get("diagnosis") then + if not ok and option.get("verbose") and option.get("diagnosis") then utils.cprint("${color.warning}checkinfo: ${clear dim}" .. errors) end return ok -- cgit v1.3.1