diff options
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r-- | lib/bb/data.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py index 4785a4798..819dff967 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -363,10 +363,12 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False): val.rstrip() if not val: return 0 + + varExpanded = expand(var, d) if getVarFlag(var, "func", d): # NOTE: should probably check for unbalanced {} within the var - o.write("%s() {\n%s\n}\n" % (var, val)) + o.write("%s() {\n%s\n}\n" % (varExpanded, val)) else: if getVarFlag(var, "export", d): o.write('export ') @@ -376,7 +378,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False): # if we're going to output this within doublequotes, # to a shell, we need to escape the quotes in the var alter = re.sub('"', '\\"', val.strip()) - o.write('%s="%s"\n' % (var, alter)) + o.write('%s="%s"\n' % (varExpanded, alter)) return 1 |