Skip to content

Commit

Permalink
Merge pull request #169 from alliedmodders/psy/file-var
Browse files Browse the repository at this point in the history
fix: Populate __file__ var when evaluating scripts
  • Loading branch information
psychonic authored Jul 6, 2024
2 parents 91a7ec7 + 9a0b25a commit 88895ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ambuild2/frontend/v2_2/context_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 88895ab

Please sign in to comment.