alliedmodders / ambuild

AlliedModders C++ Build System
BSD 3-Clause "New" or "Revised" License
60 stars 31 forks source link

fix: Populate __file__ var when evaluating scripts #169

Closed psychonic closed 2 months ago

psychonic commented 2 months ago

This change populates the normally built-in __file__ variable with the path of the script, for evaled scripts.

A current use case is being able to detect the current script path in hl2sdk-manifests's SdkHelpers.ambuild to then be able to infer the path of the manifests folder beside it.