summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-24 23:38:57 +0800
committerruki <[email protected]>2020-12-24 23:38:57 +0800
commit4707d9f3fb69841d1185ef63ad01b764a5f4b6b1 (patch)
tree92eaf0631b2480dbadde48ad1f7e4c1963a120d8
parentca145f007e0b2cff55548b6a05952b9e0308d969 (diff)
improve find_program
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_program.lua4
1 files 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