aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonmain.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r--mesonbuild/mesonmain.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index b70fd61..8a19631 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -359,7 +359,11 @@ def run(original_args, mainfile):
def main():
# Always resolve the command path so Ninja can find it for regen, tests, etc.
- launcher = os.path.realpath(sys.argv[0])
+ if 'meson.exe' in sys.executable:
+ assert(os.path.isabs(sys.executable))
+ launcher = sys.executable
+ else:
+ launcher = os.path.realpath(sys.argv[0])
return run(sys.argv[1:], launcher)
if __name__ == '__main__':