diff options
author | Marvin Scholz <epirat07@gmail.com> | 2019-07-04 22:05:42 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-05 20:58:33 +0300 |
commit | 0bf5c27b64d650042d08ab4162307dce265c62bf (patch) | |
tree | 376f23e4c5db4d5bce9614b0e502c01868823955 | |
parent | 968aee4f18caa0abe384f04c4dee07402d87ad40 (diff) | |
download | meson-0bf5c27b64d650042d08ab4162307dce265c62bf.zip meson-0bf5c27b64d650042d08ab4162307dce265c62bf.tar.gz meson-0bf5c27b64d650042d08ab4162307dce265c62bf.tar.bz2 |
env: Do not return empty tool env vars
A compiler or other tool with an empty string as name does not make
sense as it anyway can not be used and causes a failure later in
parse_entry.
Fix #5451
-rw-r--r-- | mesonbuild/envconfig.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 03c6346..cec5059 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -340,6 +340,10 @@ This is probably wrong, it should always point to the native compiler.''' % evar command = os.environ.get(evar) if command is not None: command = shlex.split(command) + + # Do not return empty string entries + if command is not None and len(command) == 0: + return None return command class Directories: |