diff options
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index c34b2e7..cd35285 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -459,11 +459,11 @@ class Environment: for compiler in compilers: if isinstance(compiler, str): compiler = [compiler] + if 'cl' in compiler or 'cl.exe' in compiler: + arg = '/?' + else: + arg = '--version' try: - if 'cl' in compiler or 'cl.exe' in compiler: - arg = '/?' - else: - arg = '--version' p, out, err = Popen_safe(compiler + [arg]) except OSError as e: popen_exceptions[' '.join(compiler + [arg])] = e |