summaryrefslogtreecommitdiff
path: root/xmake/core/base/utils.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/utils.lua')
-rw-r--r--xmake/core/base/utils.lua12
1 files changed, 4 insertions, 8 deletions
diff --git a/xmake/core/base/utils.lua b/xmake/core/base/utils.lua
index bfb5469af..5d69bdcd0 100644
--- a/xmake/core/base/utils.lua
+++ b/xmake/core/base/utils.lua
@@ -39,11 +39,8 @@ end
-- the verbose function
function utils.verbose(msg, ...)
- if option.get("verbose") then
+ if option.get("verbose") and msg ~= nil then
- -- check
- assert(msg)
-
-- trace
print(string.format(msg, ...))
end
@@ -52,11 +49,10 @@ end
-- the error function
function utils.error(msg, ...)
- -- check
- assert(msg)
-
-- trace
- print("error: " .. string.format(msg, ...))
+ if msg ~= nil then
+ print("error: " .. string.format(msg, ...))
+ end
end
-- the warning function