Skip to content

Commit 9e10ce0

Browse files
committed
[gyb] Add __file__ binding
1 parent eadc7aa commit 9e10ce0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

utils/gyb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ def execute(self, context):
699699
save_children = context.local_bindings.get('__children__')
700700
# Execute the code with our __children__ in scope
701701
context.local_bindings['__children__'] = self.children
702+
context.local_bindings['__file__'] = self.filename
702703
result = eval(self.code, context.local_bindings)
703704

704705
if context.local_bindings['__children__'] is not self.children:

0 commit comments

Comments
 (0)