Skip to contentSkip to conversation

cooker: Fix environment double key expansion issue

PATCH New Richard Purdie 1 participant 1 message Mar 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: Fix environment double key expansion issue

The base configuration needs key expansion and anon python execution, the parsed configurations do not. Fix this consistently, its been broken and causing double key expansion for a while, only relised when we started double anonymous python exeution too.

---
 lib/bb/cooker.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
lib/bb/cooker.py +2 -3
index d1df711..1fda40d 100644
@@ -516,6 +516,8 @@ class BBCooker:
             fn = runlist[0][3]
         else:
             envdata = self.data
+            data.expandKeys(envdata)
+            parse.ast.runAnonFuncs(envdata)
 
         if fn:
             try:
@@ -530,9 +532,6 @@ class BBCooker:
             self.data.inchistory.emit(env)
             logger.plain(env.getvalue())
 
-        data.expandKeys(envdata)
-        parse.ast.runAnonFuncs(envdata)
-
         # emit variables and shell functions
         with closing(StringIO()) as env:
             data.emit_env(env, envdata, True)
Signature · 1 line
2.7.4