It seems likely that the issue that bash isn’t installed on your machine in a way that CMake knows how to access. Do you have bash in your PATH? If you open up a command prompt and type bash, does it run? If not, it’s worth adding the directory of bash.exe to your PATH environment variable.
We didn’t write that script; it’s part of a third-party library called KTX-Software. Here’s an issue someone has recently written against that library, and a maintainer has offered some suggestions. It may help you, too.
In my particular case, I have both Git for Windows and WSL2 installed, and have not run into this error. I’m not sure offhand what might be causing it for you.