summaryrefslogtreecommitdiff
path: root/xmake/core/package/repository.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-15 00:41:39 +0800
committerruki <[email protected]>2018-12-14 22:09:54 +0800
commit95f46b973794b37ccd62edbcc3bfb010b0f23dcc (patch)
treeabbd878e0e78c0511c7da072ad43b70f03eeea47 /xmake/core/package/repository.lua
parent107f81a48da61d37ecbffac4e2f816b9cfedb21c (diff)
improve interpreter
Diffstat (limited to 'xmake/core/package/repository.lua')
-rw-r--r--xmake/core/package/repository.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/xmake/core/package/repository.lua b/xmake/core/package/repository.lua
index 34bb1adec..57145c3b4 100644
--- a/xmake/core/package/repository.lua
+++ b/xmake/core/package/repository.lua
@@ -99,9 +99,18 @@ function _instance:load()
local scriptpath = path.join(self:directory(), "xmake.lua")
if os.isfile(scriptpath) then
+ -- get interpreter
+ local interp = repository._interpreter()
+
+ -- load script
+ local ok, errors = interp:load(scriptpath)
+ if not ok then
+ os.raise("load repo(%s) failed, " .. errors, self:name())
+ end
+
-- load repository and disable filter
- local results, errors = repository._interpreter():load(scriptpath, nil, true, false)
- if not results and os.isfile(scriptpath) then
+ local results, errors = interp:make(nil, true, false)
+ if not results then
os.raise("load repo(%s) failed, " .. errors, self:name())
end