The basic problem here is that windows allows you to omit a file extension when referring to a file. That is, gcc is perfectly fine to refer to gcc.exe. However, calling .is_file() on a path ending with gcc where the file is actually gcc.exe will return false. This causes a bug in our compiler validation logic on Windows, leading us to tell users that their compiler couldn't be found when it definitely was.
The fix is to simply iterate over common executable extension when the is_file() check fails. If any of these extension paths exist and point to a file, we'll consider that good enough™️ and treat it as a valid compiler path. We'll still print a warning to the screen in this case, to avoid potential confusion.
The basic problem here is that windows allows you to omit a file extension when referring to a file. That is,
gcc
is perfectly fine to refer togcc.exe
. However, calling.is_file()
on a path ending withgcc
where the file is actuallygcc.exe
will returnfalse
. This causes a bug in our compiler validation logic on Windows, leading us to tell users that their compiler couldn't be found when it definitely was.The fix is to simply iterate over common executable extension when the
is_file()
check fails. If any of these extension paths exist and point to a file, we'll consider that good enough™️ and treat it as a valid compiler path. We'll still print a warning to the screen in this case, to avoid potential confusion.Addresses the main issue raised in #173