Special case shebang scripts that run with "env" on Windows.

pull/96/head
Jussi Pakkanen 10 years ago
parent f390f152e5
commit 4c52b01a13
  1. 2
      dependencies.py

@ -242,6 +242,8 @@ class ExternalProgram():
commands = first_line[2:].split('#')[0].strip().split() commands = first_line[2:].split('#')[0].strip().split()
if mesonlib.is_windows(): if mesonlib.is_windows():
commands[0] = commands[0].split('/')[-1] # Windows does not have /usr/bin. commands[0] = commands[0].split('/')[-1] # Windows does not have /usr/bin.
if commands[0] == 'env':
commands = commands[1:]
self.fullpath = commands + [trial] self.fullpath = commands + [trial]
except Exception: except Exception:
pass pass

Loading…
Cancel
Save