environment: Use os.path.basename() when checking mesonlib.meson_command

Without this, when one of Meson's parent directories contains
"python", unexpected option "-u" will be passed to Meson.
pull/4241/merge
Masanori Kakura 6 years ago committed by Jussi Pakkanen
parent 80721b7605
commit 99ecedc093
  1. 2
      mesonbuild/environment.py

@ -375,7 +375,7 @@ class Environment:
def get_build_command(self, unbuffered=False):
cmd = mesonlib.meson_command[:]
if unbuffered and 'python' in cmd[0]:
if unbuffered and 'python' in os.path.basename(cmd[0]):
cmd.insert(1, '-u')
return cmd

Loading…
Cancel
Save