diff options
author | William D. Jones <thor0505@comcast.net> | 2024-03-16 19:28:53 -0400 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2024-04-15 07:25:19 -0700 |
commit | 886836a69bab1e0af8942d3f86171c462a802ff4 (patch) | |
tree | 177839b47046c8de2862f665f93b964e1fc86871 /mesonbuild | |
parent | 1b9eb6f3134d61c5ea0026ac95d807aab812c414 (diff) | |
download | meson-886836a69bab1e0af8942d3f86171c462a802ff4.zip meson-886836a69bab1e0af8942d3f86171c462a802ff4.tar.gz meson-886836a69bab1e0af8942d3f86171c462a802ff4.tar.bz2 |
Don't sanitize a None path when checking for, but could not find, unsupported cl clones.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/detect.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index aed0339..dade204 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -287,8 +287,8 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin # practice, Meson will block waiting for Watcom's cl.exe to # exit, which requires user input and thus will never exit. if 'WATCOM' in os.environ: - def sanitize(p: str) -> str: - return os.path.normcase(os.path.abspath(p)) + def sanitize(p: T.Optional[str]) -> T.Optional[str]: + return os.path.normcase(os.path.abspath(p)) if p else None watcom_cls = [sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl')), sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl.exe')), |