summaryrefslogtreecommitdiff
path: root/mesonbuild/envconfig.py
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2019-07-04 22:05:42 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-07-05 20:58:33 +0300
commit0bf5c27b64d650042d08ab4162307dce265c62bf (patch)
tree376f23e4c5db4d5bce9614b0e502c01868823955 /mesonbuild/envconfig.py
parent968aee4f18caa0abe384f04c4dee07402d87ad40 (diff)
downloadmeson-0bf5c27b64d650042d08ab4162307dce265c62bf.tar.gz
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
Diffstat (limited to 'mesonbuild/envconfig.py')
-rw-r--r--mesonbuild/envconfig.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
index 03c6346a5..cec50599e 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: