diff options
| author | ruki <[email protected]> | 2023-09-12 23:09:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-09-12 23:09:01 +0800 |
| commit | 08a917b94646d99aabcad09b7ab76e601945a08f (patch) | |
| tree | 07081778492679a5fc680470741ab3aa1da8ae3d | |
| parent | edef4b17accd31b07ec0079d305e8f1be8d4fff9 (diff) | |
fix raise error
| -rw-r--r-- | xmake/core/base/interpreter.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua index 72643ec36..8a64aaa58 100644 --- a/xmake/core/base/interpreter.lua +++ b/xmake/core/base/interpreter.lua @@ -358,7 +358,8 @@ function interpreter:_api_translate_paths(values, apiname, infolevel) for _, p in ipairs(values) do if type(p) ~= "string" or #p == 0 then local sourceinfo = debug.getinfo(infolevel or 3, "Sl") - interpreter._raise("%s(%s): invalid path value at %s:%d", apiname, tostring(p), sourceinfo.short_src or sourceinfo.source, sourceinfo.currentline) + interpreter._raise(string.format("%s(%s): invalid path value at %s:%d", apiname, tostring(p), + sourceinfo.short_src or sourceinfo.source, sourceinfo.currentline)) end if not p:find("^%s-%$%(.-%)") and not path.is_absolute(p) then table.insert(results, path.relative(path.absolute(p, self:scriptdir()), self:rootdir())) @@ -1583,7 +1584,7 @@ function interpreter:api_builtin_set_xmakever(minver) -- parse minimum version local minvers = minver:split('.', {plain = true}) if not minvers or #minvers ~= 3 then - interpreter._raise("set_xmakever(\"%s\"): invalid version format!", minver) + interpreter._raise(string.format("set_xmakever(\"%s\"): invalid version format!", minver)) end -- make minimum numerical version @@ -1597,7 +1598,7 @@ function interpreter:api_builtin_set_xmakever(minver) -- check version if curvers_num < minvers_num then - interpreter._raise("xmake v%s < v%s, please run `$xmake update` to upgrade xmake!", xmake._VERSION_SHORT, minver) + interpreter._raise(string.format("xmake v%s < v%s, please run `$xmake update` to upgrade xmake!", xmake._VERSION_SHORT, minver)) end end |
