diff --git a/src/rez/serialise.py b/src/rez/serialise.py index fe82421ea..2608fcabb 100644 --- a/src/rez/serialise.py +++ b/src/rez/serialise.py @@ -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