diff options
author | Martin Kelly <mkelly@xevo.com> | 2018-04-24 16:53:18 -0700 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-05-30 18:29:16 +0000 |
commit | 0f86df4d232ef335705e75f0e1303af0e7c3a45c (patch) | |
tree | 8ee4af76c2b621392a1fada5fed6b8cb05437bca /mesonbuild/scripts/commandrunner.py | |
parent | b6995aac709e7eeb2626a3d023cfde3ad9999d95 (diff) | |
download | meson-0f86df4d232ef335705e75f0e1303af0e7c3a45c.zip meson-0f86df4d232ef335705e75f0e1303af0e7c3a45c.tar.gz meson-0f86df4d232ef335705e75f0e1303af0e7c3a45c.tar.bz2 |
make ExternalProgram get_path() a bit smarter
Currently, ExternalProgram get_path() assumes the last component in the
path is always the actual command path. However, this is not always
right. For example, in the command "python -u", we should return
"python" and not "-u". However, in other cases, like "python script.py",
then the last component is the right one.
The heuristic that seems to capture this is to use the last argument
that is still a file. This means options get ignored, but "python
script.py" still works. Let's use this heuristic, at least for now.
Diffstat (limited to 'mesonbuild/scripts/commandrunner.py')
0 files changed, 0 insertions, 0 deletions