summaryrefslogtreecommitdiff
path: root/xmake/core/base/utils.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-04-15 11:58:21 +0800
committerruki <[email protected]>2016-04-15 11:58:21 +0800
commita8915ae9e7eb10d30ff1cd59bb1dc719e23d0155 (patch)
treeafc6fae08e4ec77eb5473aa4abc4885c76215344 /xmake/core/base/utils.lua
parent8783f5a604a928f414059b77d2bcc4eb6ef10803 (diff)
fix bug for global
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