Skip to content

Commit

Permalink
include filepath as __file__ in global scope
Browse files Browse the repository at this point in the history
Signed-off-by: George Ridal <george.ridal@gmail.com>
  • Loading branch information
vanridal committed Oct 27, 2024
1 parent 8476696 commit a0eb0e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rez/serialise.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ def _process(value):

# apply globals
fn.__globals__["this"] = EarlyThis(data)
fn.__globals__["__file__"] = filepath
fn.__globals__.update(get_objects())

# execute the function
Expand Down

0 comments on commit a0eb0e3

Please sign in to comment.