This is the error I get when running a script that uses base/maven/tomcat/build.sh. The error only occurs in git bash and after reading commits I saw a fix for WSL2. That is why I tried to run the script in WSL2 and this also was the solution.

Probable cause:
Commit f99ad5d added sudo to the mv command, but at least my git bash doesn't seem to have the command sudo because the bash emulator default runs on root.
Solution:
Run in WSL2.