diff options
| author | ruki <[email protected]> | 2018-12-15 00:41:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-12-14 22:09:54 +0800 |
| commit | 95f46b973794b37ccd62edbcc3bfb010b0f23dcc (patch) | |
| tree | abbd878e0e78c0511c7da072ad43b70f03eeea47 /xmake/core/base/task.lua | |
| parent | 107f81a48da61d37ecbffac4e2f816b9cfedb21c (diff) | |
improve interpreter
Diffstat (limited to 'xmake/core/base/task.lua')
| -rw-r--r-- | xmake/core/base/task.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xmake/core/base/task.lua b/xmake/core/base/task.lua index b2b5b25a0..d42609756 100644 --- a/xmake/core/base/task.lua +++ b/xmake/core/base/task.lua @@ -317,9 +317,15 @@ function task._load(filepath) local interp = task._interpreter() assert(interp) + -- load script + local ok, errors = interp:load(filepath) + if not ok and os.isfile(filepath) then + return nil, errors + end + -- load tasks - local tasks, errors = interp:load(filepath, "task", true, true) - if not tasks and os.isfile(filepath) then + local tasks, errors = interp:make("task", true, true) + if not tasks then return nil, errors end |
