From 48d3405684b1c56235e7ccc2a7a94df9f888ccf3 Mon Sep 17 00:00:00 2001 From: Tom van Dijck Date: Thu, 26 Mar 2015 16:51:25 -0700 Subject: [PATCH] fix bug in oven.bubbleFields not expanding tokenized strings. --- src/base/oven.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/base/oven.lua b/src/base/oven.lua index 857fbdfd..6823a9da 100644 --- a/src/base/oven.lua +++ b/src/base/oven.lua @@ -348,7 +348,20 @@ terms.platforms = platforms for key in pairs(oven.bubbledFields) do - ctx[key] = p.configset.fetch(cset, p.field.get(key), terms) + local field = p.field.get(key) + if not field then + ctx[key] = rawget(ctx, key) + else + local value = p.configset.fetch(cset, field, terms) + if value then + -- do I need to expand tokens? + if field and field.tokens then + value = p.detoken.expand(value, ctx.environ, field, ctx._basedir) + end + + ctx[key] = value + end + end end end