From 9a0b25a765fb8fbc2af668627f8ae18a6be88676 Mon Sep 17 00:00:00 2001 From: Nick Hastings Date: Sat, 6 Jul 2024 13:00:48 -0400 Subject: [PATCH] fix: Populate __file__ var when evaluating scripts --- ambuild2/frontend/v2_2/context_manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ambuild2/frontend/v2_2/context_manager.py b/ambuild2/frontend/v2_2/context_manager.py index 3ed3b487..5c895e70 100644 --- a/ambuild2/frontend/v2_2/context_manager.py +++ b/ambuild2/frontend/v2_2/context_manager.py @@ -142,6 +142,7 @@ def execContext(self, context): # Copy vars so changes don't get inherited. scriptGlobals = copy.copy(context.vars_) + scriptGlobals['__file__'] = context.script_ self.pushContext(context) try: