diff --git a/src/rez/serialise.py b/src/rez/serialise.py index dac33a38d..f292178d2 100644 --- a/src/rez/serialise.py +++ b/src/rez/serialise.py @@ -330,6 +330,7 @@ def _process(value): # apply globals fn.__globals__["this"] = EarlyThis(data) + fn.__globals__["__file__"] = filepath fn.__globals__.update(get_objects()) # execute the function