Fixed issue with detoken not handling deferred joins correctly
This commit is contained in:
parent
cda4f94e28
commit
1d24f9994b
@ -187,6 +187,9 @@
|
||||
else
|
||||
local res = expand_cache[value]
|
||||
if res == nil then
|
||||
if type(value) == "string" and path.hasdeferredjoin(value) then
|
||||
value = path.resolvedeferredjoin(value)
|
||||
end
|
||||
res = expandvalue(value, e, f)
|
||||
expand_cache[value] = res
|
||||
end
|
||||
|
@ -104,6 +104,18 @@
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- If a path field contains a token that expands to a deferred join,
|
||||
-- it should be resolved before performing detoken.
|
||||
--
|
||||
|
||||
function suite.canExpandWithDeferredJoin()
|
||||
local cwd = os.getcwd()
|
||||
x = detoken.expand(path.deferredjoin(os.getcwd(), "%{_ACTION}"), environ, {}, cwd)
|
||||
test.isequal(os.getcwd() .. "/test", x)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- If the value being expanded is a table, iterate over all of its values.
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user