summaryrefslogtreecommitdiff
path: root/xmake/core/base/interpreter.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-02-17 23:57:06 +0800
committerruki <[email protected]>2019-02-18 10:09:01 +0800
commitfe2584406d733ad09c6bd930a187da8b5b902bff (patch)
treefe6e8f4c653e9e8d5864104099271381359ef60f /xmake/core/base/interpreter.lua
parent7feefff1352d470cb10b3b0117f2a418a8bccdf9 (diff)
add pathes for scope info
Diffstat (limited to 'xmake/core/base/interpreter.lua')
-rw-r--r--xmake/core/base/interpreter.lua17
1 files changed, 1 insertions, 16 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua
index e7dd5079d..94cea2979 100644
--- a/xmake/core/base/interpreter.lua
+++ b/xmake/core/base/interpreter.lua
@@ -348,30 +348,15 @@ end
-- translate api pathes
function interpreter:_api_translate_pathes(values)
-
- -- check
- assert(self and self._PRIVATE)
-
- -- the current file
- local curfile = self._PRIVATE._CURFILE
- assert(curfile)
-
- -- the current directory
- local curdir = path.directory(curfile)
- assert(curdir)
-
- -- translate the relative path
local results = {}
for _, p in ipairs(values) do
assert(type(p) == "string", "invalid path value: " .. tostring(p))
if not p:find("^%s-%$%(.-%)") and not path.is_absolute(p) then
- table.insert(results, path.relative(path.absolute(p, curdir), self._PRIVATE._ROOTDIR))
+ table.insert(results, path.relative(path.absolute(p, self:scriptdir()), self:rootdir()))
else
table.insert(results, p)
end
end
-
- -- ok?
return results
end