Describe the bug
When I pass an executable on PATH to SCANBUILD environment variable it fails:
Could not execute scan-build ""
To reproduce
Run SCANBUILD=scan-build ninja -C _build/ scan-build in a random Meson project.
Expected behaviour
It should either fail with a clear error like File scan-build not found in the current working directory or use PATH to look up the executable.
Other observations
I also noticed that the code silently strips any args even when absolute path is passed:
|
if exelist: |
|
tool = exelist[0] |
|
if os.path.isfile(tool) and os.access(tool, os.X_OK): |
|
return [tool] |
|
return [] |
System parameters
- Native build
- Operating system: NixOS
- Python version: 3.9.6
- Meson: 0.57.1
- Ninja: 1.10.2
Describe the bug
When I pass an executable on
PATHtoSCANBUILDenvironment variable it fails:To reproduce
Run
SCANBUILD=scan-build ninja -C _build/ scan-buildin a random Meson project.Expected behaviour
It should either fail with a clear error like
File scan-build not found in the current working directoryor usePATHto look up the executable.Other observations
I also noticed that the code silently strips any args even when absolute path is passed:
meson/mesonbuild/environment.py
Lines 209 to 213 in c5ce974
System parameters